EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges

protected EntityDefinitionUpdateManager::requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original)

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.

File

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

Class

EntityDefinitionUpdateManager
Manages entity definition updates.

Namespace

Drupal\Core\Entity

Code

protected function requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
  $storage = $this->entityManager->getStorage($entity_type->id());
  return ($storage instanceof EntityStorageSchemaInterface) && $storage->requiresEntityStorageSchemaChanges($entity_type, $original);
}
doc_Drupal
2016-10-29 09:05:01
Comments
Leave a Comment

Please login to continue.