public function DrupalNode6Migration::__construct in Drupal-to-Drupal data migration 7.2
Parameters
array $arguments:
Overrides DrupalNodeMigration::__construct
1 call to DrupalNode6Migration::__construct()
- ExampleNodeMigration::__construct in migrate_d2d_example/
node.inc - Required arguments:
1 method overrides DrupalNode6Migration::__construct()
- ExampleNodeMigration::__construct in migrate_d2d_example/
node.inc - Required arguments:
File
- d6/
node.inc, line 32 - Implementation of DrupalNodeMigration for Drupal 6 sources.
Class
- DrupalNode6Migration
- Handling specific to a Drupal 6 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 MigrateDrupal6SourceSQL($query, $this->sourceFields, NULL, $this->sourceOptions);
$this
->addFieldMapping('language', 'language')
->defaultValue($this->defaultLanguage);
$this
->addFieldMapping('body:language', 'language', FALSE)
->defaultValue($this->defaultLanguage);
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');
$this
->addSimpleMappings(array(
'tnid',
'translate',
));
}