protected function DynamicLocalTasks::moderatableEntityDefinitions in Workbench Moderation 8
Same name and namespace in other branches
- 8.2 src/Plugin/Derivative/DynamicLocalTasks.php \Drupal\workbench_moderation\Plugin\Derivative\DynamicLocalTasks::moderatableEntityDefinitions()
Returns an array of content entities that are potentially moderateable.
Return value
\Drupal\Core\Entity\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();
});
}