You are here

public function EntityDefinitionUpdateManager::updateFieldStorageDefinition in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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 189
Contains \Drupal\Core\Entity\EntityDefinitionUpdateManager.

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->entityManager
    ->clearCachedDefinitions();
  $this->entityManager
    ->onFieldStorageDefinitionUpdate($storage_definition, $original);
}