You are here

public function MigrateDestinationMenuLinks::rollback in Migrate 7.2

Delete a single menu item.

Parameters

$id: Array of fields representing the key (in this case, just mlid).

File

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

Class

MigrateDestinationMenuLinks
Destination class implementing migration into {menu_links}.

Code

public function rollback($id) {
  $mlid = reset($id);
  migrate_instrument_start('menu_link_delete');
  $this
    ->prepareRollback($mlid);

  // @todo: any error checking here? For example, menu.inc has:
  //   if ($menu = menu_load($menu_name)) { menu_delete($menu) }
  menu_link_delete($mlid);
  $this
    ->completeRollback($mlid);
  migrate_instrument_stop('menu_link_delete');
}