You are here

public function MigrateDestinationMenuLinks::prepareRollback in Migrate 7.2

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

Parameters

$mlid: ID of the menu link about to be deleted.

1 call to MigrateDestinationMenuLinks::prepareRollback()
MigrateDestinationMenuLinks::rollback in plugins/destinations/menu_links.inc
Delete a single menu item.

File

plugins/destinations/menu_links.inc, line 222
Support for menu link destinations.

Class

MigrateDestinationMenuLinks
Destination class implementing migration into {menu_links}.

Code

public function prepareRollback($mlid) {

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

  // Call any general handlers.
  migrate_handler_invoke_all('menu_links', 'prepareRollback', $mlid);

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