function SqlContentEntityStorageSchema::processFieldStorageSchema

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::processFieldStorageSchema()
  2. 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::processFieldStorageSchema()
  3. 10 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 1501

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']);
        }
    }
}

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