public function PanopolyNewsDemoTerm::__construct in Panopoly News 7
General initialization of a Migration object.
Overrides Migration::__construct
File
- panopoly_news_demo/
import/ panopoly_news_demo.term.inc, line 10 - Base Migrations for Taxonomy Terms used in Panopoly News Demo.
Class
- PanopolyNewsDemoTerm
- @file Base Migrations for Taxonomy Terms used in Panopoly News Demo.
Code
public function __construct(array $arguments) {
parent::__construct($arguments);
$this->description = t('Import taxonomy terms.');
$this->map = new MigrateSQLMap($this->machineName, array(
'name' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
), MigrateDestinationTerm::getKeySchema());
$import_path = drupal_get_path('module', 'panopoly_news_demo') . '/import/data/';
$this->source = new MigrateSourceCSV($import_path . 'panopoly_news_demo.term.csv', $this
->csvcolumns(), array(
'header_rows' => 1,
));
$this->destination = new MigrateDestinationTerm('panopoly_categories');
$this
->addFieldMapping('name', 'name');
}