You are here

protected function SqlContentEntityStorageSchema::getFieldIndexName in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::getFieldIndexName()

Generates an index name for a field data table.

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The field storage definition.

string $index: The name of the index.

Return value

string A string containing a generated index name for a field data table that is unique among all other fields.

2 calls to SqlContentEntityStorageSchema::getFieldIndexName()
SqlContentEntityStorageSchema::getDedicatedTableSchema in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Gets the SQL schema for a dedicated table.
SqlContentEntityStorageSchema::updateDedicatedTableSchema in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Updates the schema for a field stored in a shared table.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 2431

Class

SqlContentEntityStorageSchema
Defines a schema handler that supports revisionable, translatable entities.

Namespace

Drupal\Core\Entity\Sql

Code

protected function getFieldIndexName(FieldStorageDefinitionInterface $storage_definition, $index) {
  return $storage_definition
    ->getName() . '_' . $index;
}