function WorkspaceInformation::isEntityDeletable
Same name in other branches
- 10 core/modules/workspaces/src/WorkspaceInformation.php \Drupal\workspaces\WorkspaceInformation::isEntityDeletable()
File
-
core/
modules/ workspaces/ src/ WorkspaceInformation.php, line 115
Class
- WorkspaceInformation
- General service for workspace support information.
Namespace
Drupal\workspacesCode
public function isEntityDeletable(EntityInterface $entity, WorkspaceInterface $workspace) : bool {
$initial_revisions = $this->workspaceAssociation
->getAssociatedInitialRevisions($workspace->id(), $entity->getEntityTypeId());
return in_array($entity->id(), $initial_revisions, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.