class PanelizerIPEController in Lightning Workflow 8
Same name and namespace in other branches
- 8.3 src/Controller/PanelizerIPEController.php \Drupal\lightning_workflow\Controller\PanelizerIPEController
- 8.2 src/Controller/PanelizerIPEController.php \Drupal\lightning_workflow\Controller\PanelizerIPEController
Controller for Panels IPE routes that are specific to Panelizer.
Hierarchy
- class \Drupal\lightning_workflow\Controller\PanelizerIPEController extends \Drupal\panelizer\Controller\PanelizerPanelsIPEController
Expanded class hierarchy of PanelizerIPEController
1 file declares its use of PanelizerIPEController
- RouteSubscriber.php in src/
Routing/ RouteSubscriber.php
File
- src/
Controller/ PanelizerIPEController.php, line 14
Namespace
Drupal\lightning_workflow\ControllerView source
class PanelizerIPEController extends PanelizerPanelsIPEController {
/**
* The moderation information service.
*
* @var \Drupal\content_moderation\ModerationInformationInterface
*/
protected $modInfo;
/**
* PanelizerIPEController constructor.
*
* @param PanelizerInterface $panelizer
* The Panelizer service.
* @param ModerationInformationInterface $mod_info
* The moderation information service.
*/
public function __construct(PanelizerInterface $panelizer, ModerationInformationInterface $mod_info) {
parent::__construct($panelizer);
$this->modInfo = $mod_info;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('panelizer'), $container
->get('content_moderation.moderation_information'));
}
/**
* {@inheritdoc}
*/
public function revertToDefault(FieldableEntityInterface $entity, $view_mode) {
if ($this->modInfo
->isModeratedEntity($entity)) {
$entity = $this->modInfo
->getLatestRevision($entity
->getEntityTypeId(), $entity
->id());
}
return parent::revertToDefault($entity, $view_mode);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PanelizerIPEController:: |
protected | property | The moderation information service. | |
PanelizerIPEController:: |
public static | function | ||
PanelizerIPEController:: |
public | function | ||
PanelizerIPEController:: |
public | function | PanelizerIPEController constructor. |