You are here

protected function ContentEntityStorageTrait::getWorkspaceId in Multiversion 8

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

Helper method to get the workspace ID to query.

7 calls to ContentEntityStorageTrait::getWorkspaceId()
ContentEntityStorageTrait::buildCacheId in src/Entity/Storage/ContentEntityStorageTrait.php
ContentEntityStorageTrait::buildQuery in src/Entity/Storage/ContentEntityStorageTrait.php
ContentEntityStorageTrait::getFromStaticCache in src/Entity/Storage/ContentEntityStorageTrait.php
ContentEntityStorageTrait::loadByProperties in src/Entity/Storage/ContentEntityStorageTrait.php
ContentEntityStorageTrait::resetCache in src/Entity/Storage/ContentEntityStorageTrait.php

... See full list

File

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

Class

ContentEntityStorageTrait

Namespace

Drupal\multiversion\Entity\Storage

Code

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