function EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges()
  2. 8.9.x core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php \Drupal\Core\Entity\EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges()
  3. 10 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

File

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

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);
}

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