You are here

public function TableMappingInterface::getAllFieldTableNames in Drupal 9

Gets all the table names in which an entity field is stored.

The returned table names are ordered by the amount of data stored in each table. For example, a revisionable and translatable entity type which uses core's default table mapping strategy would return the table names for the entity ID field in the following order:

  • base table
  • data table
  • revision table
  • revision data table

Parameters

string $field_name: The name of the entity field to return the tables names for.

Return value

string[] An array of table names in which the given field is stored.

Throws

\Drupal\Core\Entity\Sql\SqlContentEntityStorageException

1 method overrides TableMappingInterface::getAllFieldTableNames()
DefaultTableMapping::getAllFieldTableNames in core/lib/Drupal/Core/Entity/Sql/DefaultTableMapping.php
Gets all the table names in which an entity field is stored.

File

core/lib/Drupal/Core/Entity/Sql/TableMappingInterface.php, line 143

Class

TableMappingInterface
Provides a common interface for mapping field columns to SQL tables.

Namespace

Drupal\Core\Entity\Sql

Code

public function getAllFieldTableNames($field_name);