public function WorkspaceManager::getSupportedEntityTypes in Drupal 8
Same name and namespace in other branches
- 9 core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::getSupportedEntityTypes()
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::doSwitchWorkspace in core/
modules/ workspaces/ src/ WorkspaceManager.php - Switches the current workspace.
File
- core/
modules/ workspaces/ src/ WorkspaceManager.php, line 163
Class
- WorkspaceManager
- Provides the workspace manager.
Namespace
Drupal\workspacesCode
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;
}