public function DrupalCustomBlockMigration::__construct in Drupal-to-Drupal data migration 7.2
Parameters
array $arguments:
Overrides DrupalMigration::__construct
2 calls to DrupalCustomBlockMigration::__construct()
2 methods override DrupalCustomBlockMigration::__construct()
File
- ./
block_custom.inc, line 15  - Base class for migrating custom blocks into Drupal.
 
Class
Code
public function __construct(array $arguments) {
  parent::__construct($arguments);
  // Create our three main objects - source, destination, and map
  $this->source = new MigrateSourceSQL($this
    ->query(), $this->sourceFields, NULL, $this->sourceOptions);
  $this->destination = new MigrateDestinationCustomBlock();
  $this->map = new MigrateSQLMap($this->machineName, array(
    'bid' => array(
      'type' => 'int',
      'unsigned' => TRUE,
      'not null' => TRUE,
      'description' => "The block's {block}.bid.",
    ),
  ), MigrateDestinationCustomBlock::getKeySchema());
  // The mappings are straightforward
  $this
    ->addSimpleMappings(array(
    'body',
    'info',
  ));
  $this
    ->addFieldMapping('format', 'format')
    ->callbacks(array(
    $this,
    'mapFormat',
  ));
}