public function ContentModerationIPEAccess::applies in Lightning Workflow 8
Same name and namespace in other branches
- 8.3 src/Plugin/IPEAccess/ContentModerationIPEAccess.php \Drupal\lightning_workflow\Plugin\IPEAccess\ContentModerationIPEAccess::applies()
- 8.2 src/Plugin/IPEAccess/ContentModerationIPEAccess.php \Drupal\lightning_workflow\Plugin\IPEAccess\ContentModerationIPEAccess::applies()
File
- src/
Plugin/ IPEAccess/ ContentModerationIPEAccess.php, line 54
Class
- ContentModerationIPEAccess
- Plugin annotation @IPEAccess( id = "content_moderation_ipe", label = @Translation("Content moderation") )
Namespace
Drupal\lightning_workflow\Plugin\IPEAccessCode
public function applies(PanelsDisplayVariant $display) {
$contexts = $display
->getContexts();
if (empty($contexts['@panelizer.entity_context:entity'])) {
return FALSE;
}
$context = $contexts['@panelizer.entity_context:entity'];
if ($context
->hasContextValue()) {
return $this->information
->isModeratedEntity($context
->getContextValue());
}
else {
return FALSE;
}
}