function SqlContentEntityStorage::setTableMapping

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

Sets the wrapped table mapping definition.

@internal Only to be used internally by Entity API. Expected to be removed by https://www.drupal.org/node/2554235.

Parameters

\Drupal\Core\Entity\Sql\TableMappingInterface $table_mapping: The table mapping.

File

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

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

public function setTableMapping(TableMappingInterface $table_mapping) {
    $this->tableMapping = $table_mapping;
    $this->baseTable = $table_mapping->getBaseTable();
    $this->revisionTable = $table_mapping->getRevisionTable();
    $this->dataTable = $table_mapping->getDataTable();
    $this->revisionDataTable = $table_mapping->getRevisionDataTable();
}

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