function WorkspaceAssociation::getEntityTrackingWorkspaceIds
Same name and namespace in other branches
- 10 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::getEntityTrackingWorkspaceIds()
- 9 core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::getEntityTrackingWorkspaceIds()
- 8.9.x core/modules/workspaces/src/WorkspaceAssociation.php \Drupal\workspaces\WorkspaceAssociation::getEntityTrackingWorkspaceIds()
Gets a list of workspace IDs in which an entity is tracked.
Parameters
\Drupal\Core\Entity\RevisionableInterface $entity: An entity object.
bool $latest_revision: (optional) Whether to return only the workspaces in which the latest revision of the entity is tracked. Defaults to FALSE.
Return value
string[] An array of workspace IDs where the given entity is tracked, or an empty array if it is not tracked anywhere.
Overrides WorkspaceAssociationInterface::getEntityTrackingWorkspaceIds
File
-
core/
modules/ workspaces/ src/ WorkspaceAssociation.php, line 69
Class
- WorkspaceAssociation
- Provides a class for CRUD operations on workspace associations.
Namespace
Drupal\workspacesCode
public function getEntityTrackingWorkspaceIds(RevisionableInterface $entity, bool $latest_revision = FALSE) {
return $this->workspaceTracker
->getEntityTrackingWorkspaceIds($entity, $latest_revision);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.