protected function SqlContentEntityStorageSchema::getEntityIndexName

protected SqlContentEntityStorageSchema::getEntityIndexName(ContentEntityTypeInterface $entity_type, $index)

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.

File

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

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Sql!SqlContentEntityStorageSchema.php/function/SqlContentEntityStorageSchema::getEntityIndexName/8.1.x