function SqlContentEntityStorageSchema::getFieldUniqueKeys

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

Gets a unique key schema array for a given field.

Parameters

string $field_name: The name of the field.

array $field_schema: The schema of the field.

string[] $column_mapping: A mapping of field column names to database column names.

Return value

array The schema definition for the unique keys.

1 call to SqlContentEntityStorageSchema::getFieldUniqueKeys()
SqlContentEntityStorageSchema::getSharedTableFieldSchema in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Gets the schema for a single field definition.

File

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

Class

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

Namespace

Drupal\Core\Entity\Sql

Code

protected function getFieldUniqueKeys($field_name, array $field_schema, array $column_mapping) {
    return $this->getFieldSchemaData($field_name, $field_schema, $column_mapping, 'unique keys');
}

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