function SqlContentEntityStorage::onFieldableEntityTypeUpdate

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

Reacts to the update of a fieldable entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The updated entity type definition.

\Drupal\Core\Entity\EntityTypeInterface $original: The original entity type definition.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $field_storage_definitions: The updated field storage definitions, including possibly new ones.

\Drupal\Core\Field\FieldStorageDefinitionInterface[] $original_field_storage_definitions: The original field storage definitions.

array &$sandbox: (optional) A sandbox array provided by a hook_update_N() implementation or a Batch API callback. If the entity schema update requires a data migration, this parameter is mandatory. Defaults to NULL.

Overrides EntityTypeListenerInterface::onFieldableEntityTypeUpdate

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 1544

Class

SqlContentEntityStorage
A content entity database storage implementation.

Namespace

Drupal\Core\Entity\Sql

Code

public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
    $this->wrapSchemaException(function () use ($entity_type, $original, $field_storage_definitions, $original_field_storage_definitions, &$sandbox) {
        $this->getStorageSchema()
            ->onFieldableEntityTypeUpdate($entity_type, $original, $field_storage_definitions, $original_field_storage_definitions, $sandbox);
    });
}

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