2

I've programmatically created an entity. I'd like to panelize it. What plugins do I need to write to accomplish this?

Thanks!

0

Just create a PanelizerEntity Plugin in your module. Ex if your entity type id (or machine name) is 'course'. Create a file PanelizerCourse.php in your_module/src/Plugin/PanelizerEntity/

This file should extends PanelizerEntityBase like that:

<?php

namespace Drupal\your_module\Plugin\PanelizerEntity;

use Drupal\panelizer\Plugin\PanelizerEntityBase;

/**
 * Panelizer entity plugin for integrating with courses.
 *
 * @PanelizerEntity("course")
 */
class PanelizerCourse extends PanelizerEntityBase {

}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.