You are here

public function WorkspaceManager::getSupportedEntityTypes in Workspace 8.2

Returns an array of entity types that can belong to workspaces.

Return value

\Drupal\Core\Entity\EntityTypeInterface[] The entity types what can belong to workspaces.

Overrides WorkspaceManagerInterface::getSupportedEntityTypes

1 call to WorkspaceManager::getSupportedEntityTypes()
WorkspaceManager::setActiveWorkspace in src/WorkspaceManager.php
Sets the active workspace via the workspace negotiators.

File

src/WorkspaceManager.php, line 136

Class

WorkspaceManager
Provides the workspace manager.

Namespace

Drupal\workspace

Code

public function getSupportedEntityTypes() {
  $entity_types = [];
  foreach ($this->entityTypeManager
    ->getDefinitions() as $entity_type_id => $entity_type) {
    if ($this
      ->isEntityTypeSupported($entity_type)) {
      $entity_types[$entity_type_id] = $entity_type;
    }
  }
  return $entity_types;
}