protected function DynamicLocalTasks::moderatableEntityTypeDefinitions in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 src/Plugin/Derivative/DynamicLocalTasks.php \Drupal\workbench_moderation\Plugin\Derivative\DynamicLocalTasks::moderatableEntityTypeDefinitions()
Returns an iterable of the config entities representing moderatable content.
Return value
EntityTypeInterface[] An array of just those entity types we care about.
1 call to DynamicLocalTasks::moderatableEntityTypeDefinitions()
- 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 115 
Class
- DynamicLocalTasks
- Generates moderation-related local tasks.
Namespace
Drupal\workbench_moderation\Plugin\DerivativeCode
protected function moderatableEntityTypeDefinitions() {
  $entity_types = $this->entityTypeManager
    ->getDefinitions();
  return array_filter($entity_types, function (EntityTypeInterface $type) use ($entity_types) {
    return $type instanceof ConfigEntityTypeInterface && ($bundle_of = $type
      ->get('bundle_of')) && $entity_types[$bundle_of]
      ->isRevisionable();
  });
}