You are here

protected function SqlContentEntityStorageSchema::processIdentifierSchema in Zircon Profile 8

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

Processes the specified entity key.

Parameters

array $schema: The table schema, passed by reference.

string $key: The entity key name.

3 calls to SqlContentEntityStorageSchema::processIdentifierSchema()
SqlContentEntityStorageSchema::processBaseTable in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Processes the gathered schema for a base table.
SqlContentEntityStorageSchema::processRevisionTable in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Processes the gathered schema for a base table.
UserStorageSchema::processIdentifierSchema in core/modules/user/src/UserStorageSchema.php
Processes the specified entity key.
1 method overrides SqlContentEntityStorageSchema::processIdentifierSchema()
UserStorageSchema::processIdentifierSchema in core/modules/user/src/UserStorageSchema.php
Processes the specified entity key.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 1068
Contains \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema.

Class

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

Namespace

Drupal\Core\Entity\Sql

Code

protected function processIdentifierSchema(&$schema, $key) {
  if ($schema['fields'][$key]['type'] == 'int') {
    $schema['fields'][$key]['type'] = 'serial';
  }
  $schema['fields'][$key]['not null'] = TRUE;
  unset($schema['fields'][$key]['default']);
}