You are here

public function MigrateDestinationTable::prepareRollback in Migrate 7.2

Give handlers a shot at cleaning up before the row has been rolled back.

Parameters

array $ids: The primary key values of the row about to be deleted, keyed by field name.

1 call to MigrateDestinationTable::prepareRollback()
MigrateDestinationTable::rollback in plugins/destinations/table.inc
Delete a single row.

File

plugins/destinations/table.inc, line 222
Support for tables defined through the Schema API.

Class

MigrateDestinationTable
Destination class implementing migration into a single table defined through the Schema API.

Code

public function prepareRollback(array $ids) {

  // We do nothing here but allow child classes to act.
  $migration = Migration::currentMigration();

  // Call any general handlers.
  migrate_handler_invoke_all('table', 'prepareRollback', $ids);

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