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();
}
doc_Drupal
2016-10-29 09:43:40
Comments
Leave a Comment

Please login to continue.