DefaultTableMapping::getDedicatedTableNames

public DefaultTableMapping::getDedicatedTableNames()

Gets a list of dedicated table names for this mapping.

Return value

string[] An array of table names.

File

core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php, line 297

Class

DefaultTableMapping
Defines a default table mapping class.

Namespace

Drupal\Core\Entity\Sql

Code

public function getDedicatedTableNames() {
  $table_mapping = $this;
  $definitions = array_filter($this->fieldStorageDefinitions, function($definition) use ($table_mapping) {
    return $table_mapping->requiresDedicatedTableStorage($definition);
  });
  $data_tables = array_map(function($definition) use ($table_mapping) {
    return $table_mapping->getDedicatedDataTableName($definition);
  }, $definitions);
  $revision_tables = array_map(function($definition) use ($table_mapping) {
    return $table_mapping->getDedicatedRevisionTableName($definition);
  }, $definitions);
  $dedicated_tables = array_merge(array_values($data_tables), array_values($revision_tables));
  return $dedicated_tables;
}
doc_Drupal
2016-10-29 09:01:53
Comments
Leave a Comment

Please login to continue.