function WorkspaceManager::isEntityTypeSupported
Same name in other branches
- 8.9.x core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::isEntityTypeSupported()
- 10 core/modules/workspaces/src/WorkspaceManager.php \Drupal\workspaces\WorkspaceManager::isEntityTypeSupported()
Overrides WorkspaceManagerInterface::isEntityTypeSupported
2 calls to WorkspaceManager::isEntityTypeSupported()
- WorkspaceManager::getSupportedEntityTypes in core/
modules/ workspaces/ src/ WorkspaceManager.php - Returns an array of entity types that can belong to workspaces.
- WorkspaceManager::shouldAlterOperations in core/
modules/ workspaces/ src/ WorkspaceManager.php - Determines whether runtime entity operations should be altered.
File
-
core/
modules/ workspaces/ src/ WorkspaceManager.php, line 140
Class
- WorkspaceManager
- Provides the workspace manager.
Namespace
Drupal\workspacesCode
public function isEntityTypeSupported(EntityTypeInterface $entity_type) {
$entity_type_id = $entity_type->id();
if (!isset($this->supported[$entity_type_id])) {
// Only entity types which are revisionable and publishable can belong
// to a workspace.
$this->supported[$entity_type_id] = $entity_type->entityClassImplements(EntityPublishedInterface::class) && $entity_type->isRevisionable();
}
return $this->supported[$entity_type_id];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.