public function MigrateDestinationNode::rollback in Migrate 6.2
Delete a node
Parameters
$nid: Array containing the node ID to be deleted.
File
- plugins/
destinations/ node.inc, line 105 - Support for node destinations.
Class
- MigrateDestinationNode
- Destination class implementing migration into nodes.
Code
public function rollback(array $nid) {
static $count = 0;
migrate_instrument_start('node_delete');
$this
->prepareRollback($nid);
node_delete(reset($nid));
// Periodically flush the node cache
if ($count++ > 500) {
$count = 0;
node_load(1, NULL, TRUE);
}
$this
->completeRollback($nid);
migrate_instrument_stop('node_delete');
}