You are here

protected function ContentEntityStorageTrait::getWorkspaceId in Multiversion 8.2

Same name and namespace in other branches
  1. 8 src/Entity/Storage/ContentEntityStorageTrait.php \Drupal\multiversion\Entity\Storage\ContentEntityStorageTrait::getWorkspaceId()

Helper method to get the workspace ID to query.

8 calls to ContentEntityStorageTrait::getWorkspaceId()
ContentEntityStorageTrait::buildQuery in src/Entity/Storage/ContentEntityStorageTrait.php
ContentEntityStorageTrait::doSave in src/Entity/Storage/ContentEntityStorageTrait.php
@todo Revisit this logic with forward revisions in mind.
ContentEntityStorageTrait::indexEntity in src/Entity/Storage/ContentEntityStorageTrait.php
Indexes basic information about the entity.
ContentEntityStorageTrait::indexEntityRevision in src/Entity/Storage/ContentEntityStorageTrait.php
Indexes information about the revision.
ContentEntityStorageTrait::indexEntityRevisionTree in src/Entity/Storage/ContentEntityStorageTrait.php
Indexes the revision tree.

... See full list

File

src/Entity/Storage/ContentEntityStorageTrait.php, line 116

Class

ContentEntityStorageTrait

Namespace

Drupal\multiversion\Entity\Storage

Code

protected function getWorkspaceId() {
  return $this->workspaceId ?: \Drupal::service('workspaces.manager')
    ->getActiveWorkspace()
    ->id();
}