function EntityDefinitionUpdateManager::requiresFieldStorageSchemaChanges

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::requiresFieldStorageSchemaChanges()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::requiresFieldStorageSchemaChanges()
  3. 10 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::requiresFieldStorageSchemaChanges()

Checks if the changes to the storage definition requires schema changes.

Parameters

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

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

Return value

bool TRUE if storage schema changes are required, FALSE otherwise.

1 call to EntityDefinitionUpdateManager::requiresFieldStorageSchemaChanges()
EntityDefinitionUpdateManager::getChangeList in core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
Gets a list of changes to entity type and field storage definitions.

File

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

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

protected function requiresFieldStorageSchemaChanges(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {
    $storage = $this->entityTypeManager
        ->getStorage($storage_definition->getTargetEntityTypeId());
    return $storage instanceof DynamicallyFieldableEntityStorageSchemaInterface && $storage->requiresFieldStorageSchemaChanges($storage_definition, $original);
}

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