function SqlContentEntityStorageSchema::getEntityIndexName

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

Gets the name to be used for the given entity index.

Parameters

\Drupal\Core\Entity\ContentEntityTypeInterface $entity_type: The entity type.

string $index: The index column name.

Return value

string The index name.

1 call to SqlContentEntityStorageSchema::getEntityIndexName()
SqlContentEntityStorageSchema::initializeBaseTable in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Initializes common information for a base table.

File

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

Class

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

Namespace

Drupal\Core\Entity\Sql

Code

protected function getEntityIndexName(ContentEntityTypeInterface $entity_type, $index) {
    return $entity_type->id() . '__' . $index;
}

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