function WorkspacesEntityRepository::getActive
Overrides EntityRepositoryInterface::getActive
File
-
core/
modules/ workspaces/ src/ WorkspacesEntityRepository.php, line 42
Class
- WorkspacesEntityRepository
- Provides workspace-specific mechanisms for retrieving entities.
Namespace
Drupal\workspacesCode
public function getActive($entity_type_id, $entity_id, ?array $contexts = NULL) {
// When there's no active workspace, the active entity variant is the
// canonical one.
if (!$this->workspaceManager
->hasActiveWorkspace()) {
return $this->inner
->getCanonical($entity_type_id, $entity_id, $contexts);
}
return $this->inner
->getActive($entity_type_id, $entity_id, $contexts);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.