You are here

protected function EntityTypeInfo::selectMultiversionedUiEntityTypes in Workspace 8

Returns just those entity definitions that need multiversion UI enhancement.

Parameters

\Drupal\Core\Entity\EntityTypeInterface[] $entity_types: The entity types to check.

Return value

EntityTypeInterface[] Just the entities that we care about.

1 call to EntityTypeInfo::selectMultiversionedUiEntityTypes()
EntityTypeInfo::entityTypeAlter in src/EntityTypeInfo.php

File

src/EntityTypeInfo.php, line 67

Class

EntityTypeInfo
Service class for manipulating entity type information.

Namespace

Drupal\workspace

Code

protected function selectMultiversionedUiEntityTypes(array $entity_types) {
  return array_filter($entity_types, function (EntityTypeInterface $type) {
    return $this->multiversionManager
      ->isEnabledEntityType($type) && $type
      ->hasViewBuilderClass() && $type
      ->hasLinkTemplate('canonical');
  });
}