You are here

public function SqlContentEntityStorageSchema::requiresEntityStorageSchemaChanges in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::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.

Overrides EntityStorageSchemaInterface::requiresEntityStorageSchemaChanges

1 call to SqlContentEntityStorageSchema::requiresEntityStorageSchemaChanges()
SqlContentEntityStorageSchema::onEntityTypeUpdate in core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
Reacts to the update of the entity type.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 131
Contains \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema.

Class

SqlContentEntityStorageSchema
Defines a schema handler that supports revisionable, translatable entities.

Namespace

Drupal\Core\Entity\Sql

Code

public function requiresEntityStorageSchemaChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
  return $this
    ->hasSharedTableStructureChange($entity_type, $original) || $this
    ->getEntitySchemaData($entity_type, $this
    ->getEntitySchema($entity_type, TRUE)) != $this
    ->loadEntitySchemaData($original);
}