public function SqlContentEntityStorage::getTableMapping in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getTableMapping()
Gets a table mapping for the entity's SQL tables.
Parameters
\Drupal\Core\Field\FieldStorageDefinitionInterface[] $storage_definitions: (optional) An array of field storage definitions to be used to compute the table mapping. Defaults to the ones provided by the entity field manager.
Return value
\Drupal\Core\Entity\Sql\TableMappingInterface A table mapping object for the entity's tables.
Overrides SqlEntityStorageInterface::getTableMapping
17 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.
- SqlContentEntityStorage::buildQuery in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Builds the query to load the entity.
- SqlContentEntityStorage::countFieldData in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Determines the number of entities with values for a given field.
- SqlContentEntityStorage::deleteFromDedicatedTables in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Deletes values of fields in dedicated tables for all revisions.
- SqlContentEntityStorage::deleteRevisionFromDedicatedTables in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Deletes values of fields in dedicated tables for all revisions.
File
- core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 345
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\SqlCode
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;
}