function SqlContentEntityStorageSchema::handleEntityTypeSchemaUpdateExceptionOnDataCopy

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::handleEntityTypeSchemaUpdateExceptionOnDataCopy()
  2. 10 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::handleEntityTypeSchemaUpdateExceptionOnDataCopy()
  3. 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php \Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::handleEntityTypeSchemaUpdateExceptionOnDataCopy()

Overrides SqlFieldableEntityTypeListenerTrait::handleEntityTypeSchemaUpdateExceptionOnDataCopy

File

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

Class

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

Namespace

Drupal\Core\Entity\Sql

Code

protected function handleEntityTypeSchemaUpdateExceptionOnDataCopy(EntityTypeInterface $entity_type, EntityTypeInterface $original, array &$sandbox) {
    // In case of an error during the save process, we need to clean up the
    // temporary tables.
    foreach ($sandbox['temporary_table_names'] as $table_name) {
        $this->database
            ->schema()
            ->dropTable($table_name);
    }
}

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