You are here

protected function EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges in Drupal 8

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

Checks if the changes to the entity type requires storage schema changes.

Parameters

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

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

Return value

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

1 call to EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges()
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 370

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

protected function requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
  $storage = $this->entityTypeManager
    ->getStorage($entity_type
    ->id());
  return $storage instanceof EntityStorageSchemaInterface && $storage
    ->requiresEntityStorageSchemaChanges($entity_type, $original);
}