function SqlContentEntityStorage::getTableMapping

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getTableMapping()
  2. 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getTableMapping()
  3. 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getTableMapping()
  4. 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getTableMapping()
3 calls to SqlContentEntityStorage::getTableMapping()
MenuLinkContentStorage::getMenuLinkIdsWithPendingRevisions in core/modules/menu_link_content/src/MenuLinkContentStorage.php
Gets a list of menu link IDs with pending revisions.
TermStorage::getTermIdsWithPendingRevisions in core/modules/taxonomy/src/TermStorage.php
Gets a list of term IDs with pending revisions.
TermStorage::getVocabularyHierarchyType in core/modules/taxonomy/src/TermStorage.php
Returns the hierarchy type for a specific vocabulary ID.
1 method overrides SqlContentEntityStorage::getTableMapping()
TestableSqlContentEntityStorage::getTableMapping in core/tests/Drupal/KernelTests/Core/Entity/Sql/TestableSqlContentEntityStorage.php
Overrides original SqlContentEntityStorage::getTableMapping().

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 346

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

public function getTableMapping(?array $storage_definitions = NULL) {
  // If a new set of field storage definitions is passed, for instance when
  // comparing old and new storage schema, we compute the table mapping
  // without caching.
  if ($storage_definitions) {
    return $this->getCustomTableMapping($this->entityType, $storage_definitions);
  }
  // If we are using our internal storage definitions, which is our main use
  // case, we can statically cache the computed table mapping.
  if (!isset($this->tableMapping)) {
    $this->tableMapping = $this->getCustomTableMapping($this->entityType, $this->fieldStorageDefinitions);
  }
  return $this->tableMapping;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.