You are here

protected function SqlContentEntityStorageSchema::processFieldStorageSchema 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::processFieldStorageSchema()

Processes the schema for a field storage definition.

Parameters

array &$field_storage_schema: An array that contains the schema data for a field storage definition.

2 calls to SqlContentEntityStorageSchema::processFieldStorageSchema()
SqlContentEntityStorageSchema::requiresFieldStorageSchemaChanges in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Checks if the changes to the storage definition requires schema changes.
SqlContentEntityStorageSchema::saveFieldSchemaData in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Stores schema data for the given field storage definition.

File

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

Class

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

Namespace

Drupal\Core\Entity\Sql

Code

protected function processFieldStorageSchema(array &$field_storage_schema) {

  // Clean up some schema properties that should not be taken into account
  // after a field storage has been created.
  foreach ($field_storage_schema as $table_name => $table_schema) {
    foreach ($table_schema['fields'] as $key => $schema) {
      unset($field_storage_schema[$table_name]['fields'][$key]['initial']);
      unset($field_storage_schema[$table_name]['fields'][$key]['initial_from_field']);
    }
  }
}