You are here

public function MigrateDestinationCustomBlock::prepare in Migrate 7.2

Implementation of MigrateDestination::prepare().

1 call to MigrateDestinationCustomBlock::prepare()
MigrateDestinationCustomBlock::import in plugins/destinations/block_custom.inc
Import a single row.

File

plugins/destinations/block_custom.inc, line 135
Support for custom block destinations.

Class

MigrateDestinationCustomBlock
Destination class implementing migration into {block_custom}.

Code

public function prepare($block, stdClass $row) {

  // We do nothing here but allow child classes to act.
  $migration = Migration::currentMigration();
  $block->migrate = array(
    'machineName' => $migration
      ->getMachineName(),
  );

  // Call any general handlers.
  migrate_handler_invoke_all('block_custom', 'prepare', $block, $row);

  // Then call any prepare handler for this specific Migration.
  if (method_exists($migration, 'prepare')) {
    $migration
      ->prepare($block, $row);
  }
}