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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
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
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.