@@ -23,10 +23,10 @@ |
||
| 23 | 23 | MigrateDestinationNode::getKeySchema() |
| 24 | 24 | ); |
| 25 | 25 | |
| 26 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 26 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 27 | 27 | |
| 28 | 28 | // Create a MigrateSource object. |
| 29 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_tweets.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 29 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_tweets.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 30 | 30 | $this->destination = new MigrateDestinationNode('wem_tweet'); |
| 31 | 31 | |
| 32 | 32 | // Tweet Fields |
@@ -10,14 +10,14 @@ |
||
| 10 | 10 | public function __construct($arguments) { |
| 11 | 11 | parent::__construct($arguments); |
| 12 | 12 | $this->description = t('Import nodes.'); |
| 13 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 13 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 14 | 14 | // Create a MigrateSource object. |
| 15 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_contest.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_contest.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 16 | 16 | $this->destination = new MigrateDestinationNode('wem_contest'); |
| 17 | 17 | // Image |
| 18 | 18 | $this->addFieldMapping('field_contest_image', 'image'); |
| 19 | 19 | $this->addFieldMapping('field_contest_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
| 20 | - $this->addFieldMapping('field_contest_image:source_dir')->defaultValue($import_path . 'images'); |
|
| 20 | + $this->addFieldMapping('field_contest_image:source_dir')->defaultValue($import_path.'images'); |
|
| 21 | 21 | $this->addFieldMapping('field_contest_image:destination_file', 'filename'); |
| 22 | 22 | // Taxonomy |
| 23 | 23 | $this->addFieldMapping('field_contest_interests', 'interests'); |
@@ -26,12 +26,12 @@ |
||
| 26 | 26 | $this->destination = new MigrateDestinationEntityAPI('commerce_product', 'wem_product'); |
| 27 | 27 | |
| 28 | 28 | // Define a default import path. |
| 29 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 29 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 30 | 30 | |
| 31 | 31 | // Create a MigrateSource object. |
| 32 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.products.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 32 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.products.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 33 | 33 | |
| 34 | - $this->addFieldMapping('field_images:source_dir')->defaultValue($import_path . 'images'); |
|
| 34 | + $this->addFieldMapping('field_images:source_dir')->defaultValue($import_path.'images'); |
|
| 35 | 35 | |
| 36 | 36 | $this->addFieldMapping('field_wem_product_interests', 'interests'); |
| 37 | 37 | |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | |
| 10 | 10 | public function __construct($arguments) { |
| 11 | 11 | parent::__construct($arguments); |
| 12 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 13 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.terms.persona.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 12 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 13 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.terms.persona.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 14 | 14 | $this->destination = new MigrateDestinationTerm('persona'); |
| 15 | 15 | $this->addFieldMapping('name', 'name'); |
| 16 | 16 | } |
@@ -9,8 +9,8 @@ |
||
| 9 | 9 | |
| 10 | 10 | public function __construct($arguments) { |
| 11 | 11 | parent::__construct($arguments); |
| 12 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 13 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.terms.interests.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 12 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 13 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.terms.interests.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 14 | 14 | $this->destination = new MigrateDestinationTerm('interests'); |
| 15 | 15 | $this->addFieldMapping('name', 'name'); |
| 16 | 16 | } |
@@ -11,8 +11,8 @@ |
||
| 11 | 11 | parent::__construct($arguments); |
| 12 | 12 | $this->description = t('Import WEM Commerce product nodes.'); |
| 13 | 13 | $this->dependencies = array('DFSWEMProducts'); |
| 14 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 15 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_commerce.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 14 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_commerce.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 16 | 16 | $this->destination = new MigrateDestinationNode('wem_commerce'); |
| 17 | 17 | // Commerce |
| 18 | 18 | $this->addFieldMapping('field_wem_product_ref', 'skus'); |
@@ -10,14 +10,14 @@ |
||
| 10 | 10 | public function __construct($arguments) { |
| 11 | 11 | parent::__construct($arguments); |
| 12 | 12 | $this->description = t('Import node translations.'); |
| 13 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 13 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 14 | 14 | // Create a MigrateSource object. |
| 15 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_news.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_news.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 16 | 16 | $this->destination = new MigrateDestinationNode('wem_news'); |
| 17 | 17 | // Image |
| 18 | 18 | $this->addFieldMapping('field_wem_image', 'image'); |
| 19 | 19 | $this->addFieldMapping('field_wem_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
| 20 | - $this->addFieldMapping('field_wem_image:source_dir')->defaultValue($import_path . 'images'); |
|
| 20 | + $this->addFieldMapping('field_wem_image:source_dir')->defaultValue($import_path.'images'); |
|
| 21 | 21 | $this->addFieldMapping('field_wem_image:destination_file', 'filename'); |
| 22 | 22 | // Video |
| 23 | 23 | $this->addFieldMapping('field_wem_video', 'video')->sourceMigration('DFSWEMNewsVideo'); |
@@ -21,8 +21,8 @@ |
||
| 21 | 21 | ); |
| 22 | 22 | $this->description = t('Import translated WEM Commerce product nodes.'); |
| 23 | 23 | $this->dependencies = array('DFSWEMProducts'); |
| 24 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
| 25 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_commerce.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 24 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
| 25 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_commerce.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
| 26 | 26 | $this->destination = new MigrateDestinationNode('wem_commerce'); |
| 27 | 27 | // Commerce |
| 28 | 28 | $this->addFieldMapping('field_wem_product_ref', 'skus'); |
@@ -36,14 +36,14 @@ |
||
| 36 | 36 | $import_path = $arguments['path']; |
| 37 | 37 | } |
| 38 | 38 | else { |
| 39 | - $import_path = drupal_get_path('module', 'df_tools_hero') . '/import/df_tools_hero.fpp.hero.csv'; |
|
| 39 | + $import_path = drupal_get_path('module', 'df_tools_hero').'/import/df_tools_hero.fpp.hero.csv'; |
|
| 40 | 40 | } |
| 41 | 41 | $this->source = new MigrateSourceCSV($import_path, array(), array('header_rows' => 1)); |
| 42 | 42 | $this->destination = new MigrateDestinationBean('df_bean_hero'); |
| 43 | 43 | |
| 44 | 44 | $this->addFieldMapping('field_hero_image', 'Image'); |
| 45 | 45 | $this->addFieldMapping('field_hero_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
| 46 | - $this->addFieldMapping('field_hero_image:source_dir')->defaultValue(dirname($import_path) . '/images'); |
|
| 46 | + $this->addFieldMapping('field_hero_image:source_dir')->defaultValue(dirname($import_path).'/images'); |
|
| 47 | 47 | $this->addFieldMapping('field_hero_image:destination_file', 'filename'); |
| 48 | 48 | |
| 49 | 49 | $this->addFieldMapping('field_hero_headline_1', 'Headline 1'); |
@@ -34,8 +34,7 @@ |
||
| 34 | 34 | // Create a MigrateSource object. |
| 35 | 35 | if (isset($arguments['path'])) { |
| 36 | 36 | $import_path = $arguments['path']; |
| 37 | - } |
|
| 38 | - else { |
|
| 37 | + } else { |
|
| 39 | 38 | $import_path = drupal_get_path('module', 'df_tools_hero') . '/import/df_tools_hero.fpp.hero.csv'; |
| 40 | 39 | } |
| 41 | 40 | $this->source = new MigrateSourceCSV($import_path, array(), array('header_rows' => 1)); |