protected function DynamicLocalTasks::moderatableEntityDefinitions in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/Plugin/Derivative/DynamicLocalTasks.php \Drupal\workbench_moderation\Plugin\Derivative\DynamicLocalTasks::moderatableEntityDefinitions()
Returns an array of content entities that are potentially moderateable.
Return value
EntityTypeInterface[] An array of just those entities we care about.
1 call to DynamicLocalTasks::moderatableEntityDefinitions()
- DynamicLocalTasks::getDerivativeDefinitions in src/
Plugin/ Derivative/ DynamicLocalTasks.php - Gets the definition of all derivatives of a base plugin.
File
- src/
Plugin/ Derivative/ DynamicLocalTasks.php, line 101
Class
- DynamicLocalTasks
- Generates moderation-related local tasks.
Namespace
Drupal\workbench_moderation\Plugin\DerivativeCode
protected function moderatableEntityDefinitions() {
return array_filter($this->entityTypeManager
->getDefinitions(), function (EntityTypeInterface $type) {
return $type instanceof ContentEntityTypeInterface && $type
->getBundleEntityType() && $type
->isRevisionable();
});
}