@@ -13,10 +13,10 @@ discard block |
||
13 | 13 | |
14 | 14 | $this->dependencies = array('DFSWEMCommerceNodes'); |
15 | 15 | |
16 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
16 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
17 | 17 | |
18 | 18 | // Create a MigrateSource object. |
19 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.nodes.wem_product_review.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
19 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_product_review.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
20 | 20 | |
21 | 21 | $this->destination = new MigrateDestinationNode('wem_product_review'); |
22 | 22 | |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | // Image |
30 | 30 | $this->addFieldMapping('field_product_review_image', 'image'); |
31 | 31 | $this->addFieldMapping('field_product_review_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
32 | - $this->addFieldMapping('field_product_review_image:source_dir')->defaultValue($import_path . 'images'); |
|
32 | + $this->addFieldMapping('field_product_review_image:source_dir')->defaultValue($import_path.'images'); |
|
33 | 33 | $this->addFieldMapping('field_product_review_image:destination_file', 'filename'); |
34 | 34 | |
35 | 35 | // Created |
@@ -9,8 +9,8 @@ |
||
9 | 9 | public function __construct($arguments) { |
10 | 10 | parent::__construct($arguments); |
11 | 11 | $this->dependencies = array('DFSWEMContestNodes', 'DFSWEMUsers'); |
12 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
13 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_wem.groups.wem_contest.users.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.groups.wem_contest.users.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
14 | 14 | // Group |
15 | 15 | $this->addFieldMapping('gid', 'group')->sourceMigration('DFSWEMContestNodes'); |
16 | 16 | // User |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * Implements hook_migrate_api(). |
11 | 11 | */ |
12 | 12 | function dfs_wem_migrate_api() { |
13 | - $import_path = drupal_get_path('module', 'dfs_wem') . '/import/'; |
|
13 | + $import_path = drupal_get_path('module', 'dfs_wem').'/import/'; |
|
14 | 14 | $api = array( |
15 | 15 | 'api' => 2, |
16 | 16 | 'groups' => array( |
@@ -32,8 +32,8 @@ discard block |
||
32 | 32 | 'DFSWEMProducts' => array('class_name' => 'DFSWEMProducts', 'group_name' => 'dfs_wem'), |
33 | 33 | 'DFSWEMProductReviewNodes' => array('class_name' => 'DFSWEMProductReviewNodes', 'group_name' => 'dfs_wem'), |
34 | 34 | 'DFSWEMTweetNodes' => array('class_name' => 'DFSWEMTweetNodes', 'group_name' => 'dfs_wem'), |
35 | - 'DFSWEMUserPictures' => array('class_name' => 'DFUserPictures', 'path' => $import_path . 'dfs_wem.users.csv', 'group_name' => 'dfs_wem'), |
|
36 | - 'DFSWEMUsers' => array('class_name' => 'DFUsers', 'path' => $import_path . 'dfs_wem.users.csv', 'picture_source' => 'DFSWEMUserPictures', 'group_name' => 'dfs_wem'), |
|
35 | + 'DFSWEMUserPictures' => array('class_name' => 'DFUserPictures', 'path' => $import_path.'dfs_wem.users.csv', 'group_name' => 'dfs_wem'), |
|
36 | + 'DFSWEMUsers' => array('class_name' => 'DFUsers', 'path' => $import_path.'dfs_wem.users.csv', 'picture_source' => 'DFSWEMUserPictures', 'group_name' => 'dfs_wem'), |
|
37 | 37 | ), |
38 | 38 | ); |
39 | 39 | return $api; |
@@ -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'); |