public function DrupalNode5Migration::__construct in Drupal-to-Drupal data migration 7.2
Parameters
array $arguments:
Overrides DrupalNodeMigration::__construct
File
- d5/
node.inc, line 24 - Implementation of DrupalNodeMigration for Drupal 5 sources.
Class
- DrupalNode5Migration
- Handling specific to a Drupal 5 source for nodes.
Code
public function __construct(array $arguments) {
parent::__construct($arguments);
$query = $this
->query();
$this->sourceOptions['fix_field_names'] = $this->fixFieldNames;
$this->source = new MigrateDrupal5SourceSQL($query, $this->sourceFields, NULL, $this->sourceOptions);
if (field_info_instance('node', 'body', $this->destinationType)) {
$this
->addFieldMapping('body:summary', 'teaser');
$this
->addFieldMapping('body:format', 'format')
->callbacks(array(
$this,
'mapFormat',
));
}
else {
$this
->addUnmigratedSources(array(
'teaser',
'format',
));
}
$this
->addFieldMapping(NULL, 'moderate');
}