You are here

public function EntityDefinitionUpdateManager::updateFieldStorageDefinition in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::updateFieldStorageDefinition()

Applies any change performed to the passed field storage definition.

Parameters

\Drupal\Core\Field\FieldStorageDefinitionInterface $storage_definition: The field storage definition.

Overrides EntityDefinitionUpdateManagerInterface::updateFieldStorageDefinition

File

core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php, line 278

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

public function updateFieldStorageDefinition(FieldStorageDefinitionInterface $storage_definition) {
  $original = $this
    ->getFieldStorageDefinition($storage_definition
    ->getName(), $storage_definition
    ->getTargetEntityTypeId());
  $this
    ->clearCachedDefinitions();
  $this->fieldStorageDefinitionListener
    ->onFieldStorageDefinitionUpdate($storage_definition, $original);
}