public function ContentModerationIPEAccess::access in Lightning Workflow 8.2
Same name and namespace in other branches
- 8.3 src/Plugin/IPEAccess/ContentModerationIPEAccess.php \Drupal\lightning_workflow\Plugin\IPEAccess\ContentModerationIPEAccess::access()
- 8 src/Plugin/IPEAccess/ContentModerationIPEAccess.php \Drupal\lightning_workflow\Plugin\IPEAccess\ContentModerationIPEAccess::access()
File
- src/
Plugin/ IPEAccess/ ContentModerationIPEAccess.php, line 73
Class
- ContentModerationIPEAccess
- Plugin annotation @IPEAccess( id = "content_moderation_ipe", label = @Translation("Content moderation") )
Namespace
Drupal\lightning_workflow\Plugin\IPEAccessCode
public function access(PanelsDisplayVariant $display) {
$entity = $display
->getContexts()['@panelizer.entity_context:entity']
->getContextValue();
return $this->information
->isLatestRevision($entity) && !$this->information
->isLiveRevision($entity);
}