You are here

public function MigrateDestinationEntity::completeRollback in Migrate 7.2

Same name and namespace in other branches
  1. 6.2 plugins/destinations/entity.inc \MigrateDestinationEntity::completeRollback()

Give handlers a shot at cleaning up after an entity has been rolled back.

Parameters

$entity_id: ID of the entity which has been deleted.

6 calls to MigrateDestinationEntity::completeRollback()
MigrateDestinationComment::bulkRollback in plugins/destinations/comment.inc
Delete a batch of comments at once.
MigrateDestinationFile::rollback in plugins/destinations/file.inc
Delete a file entry.
MigrateDestinationNode::bulkRollback in plugins/destinations/node.inc
Delete a batch of nodes at once.
MigrateDestinationNodeRevision::bulkRollback in plugins/destinations/node.inc
Rolls back any versions that have been created.
MigrateDestinationTerm::rollback in plugins/destinations/term.inc
Delete a migrated term

... See full list

File

plugins/destinations/entity.inc, line 109
Defines base for migration destinations implemented as Drupal entities.

Class

MigrateDestinationEntity
Abstract base class for entity-based destination handling. Holds common Field API-related functions.

Code

public function completeRollback($entity_id) {
  $migration = Migration::currentMigration();

  // Call any general entity handlers (in particular, the builtin field handler)
  migrate_handler_invoke_all('Entity', 'completeRollback', $entity_id);

  // Then call any entity-specific handlers
  migrate_handler_invoke_all($this->entityType, 'completeRollback', $entity_id);

  // Then call any complete handler for this specific Migration.
  if (method_exists($migration, 'completeRollback')) {
    $migration
      ->completeRollback($entity_id);
  }
}