protected EntityTypeInfo::filterNonRevisionableEntityTypes(array $entity_types)
Filters entity type lists to return only revisionable entity types.
Parameters
EntityTypeInterface[] $entity_types: The master entity type list filter.
Return value
\Drupal\Core\Config\Entity\ConfigEntityTypeInterface[] An array of revisionable entity types which are configuration entities.
File
- core/modules/content_moderation/src/EntityTypeInfo.php, line 399
Class
- EntityTypeInfo
- Manipulates entity type information.
Namespace
Drupal\content_moderation
Code
protected function filterNonRevisionableEntityTypes(array $entity_types) { 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(); }); }
Please login to continue.