protected function SqlContentEntityStorageSchema::hasSharedTableNameChanges

protected SqlContentEntityStorageSchema::hasSharedTableNameChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original)

Detects whether any table name got renamed in an entity type update.

Parameters

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

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

Return value

bool Returns TRUE if there have been changes.

File

core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php, line 163

Class

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

Namespace

Drupal\Core\Entity\Sql

Code

protected function hasSharedTableNameChanges(EntityTypeInterface $entity_type, EntityTypeInterface $original) {
  return 
  $entity_type->getBaseTable() != $original->getBaseTable() ||
    $entity_type->getDataTable() != $original->getDataTable() ||
    $entity_type->getRevisionTable() != $original->getRevisionTable() ||
    $entity_type->getRevisionDataTable() != $original->getRevisionDataTable();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Sql!SqlContentEntityStorageSchema.php/function/SqlContentEntityStorageSchema::hasSharedTableNameChanges/8.1.x