function SqlContentEntityStorage::getCustomTableMapping

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getCustomTableMapping()
  2. 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getCustomTableMapping()
  3. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::getCustomTableMapping()

Gets a table mapping for the specified entity type and storage definitions.

@internal

Parameters

\Drupal\Core\Entity\ContentEntityTypeInterface $entity_type: An entity type definition.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $storage_definitions: An array of field storage definitions to be used to compute the table mapping.

string $prefix: (optional) A prefix to be used by all the tables of this mapping. Defaults to an empty string.

Return value

\Drupal\Core\Entity\Sql\TableMappingInterface A table mapping object for the entity's tables.

1 call to SqlContentEntityStorage::getCustomTableMapping()
SqlContentEntityStorage::getTableMapping in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
Gets a table mapping for the entity's SQL tables.

File

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

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

public function getCustomTableMapping(ContentEntityTypeInterface $entity_type, array $storage_definitions, $prefix = '') {
    $prefix = $prefix ?: ($this->temporary ? 'tmp_' : '');
    return DefaultTableMapping::create($entity_type, $storage_definitions, $prefix);
}

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