You are here

protected function EntityDefinitionUpdateManager::requiresFieldStorageSchemaChanges in Drupal 9

Same name and namespace in other branches
  1. 8 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);
}