@@ -19,16 +19,16 @@ discard block |
||
19 | 19 | ), |
20 | 20 | MigrateDestinationNode::getKeySchema() |
21 | 21 | ); |
22 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
22 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
23 | 23 | // Create a MigrateSource object. |
24 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.nodes.collection.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
24 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.collection.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
25 | 25 | $this->destination = new MigrateDestinationNode('episodic_collection'); |
26 | 26 | // Created |
27 | 27 | $this->addFieldMapping('created', 'created')->defaultValue(strtotime("now")); |
28 | 28 | // Splash Image |
29 | 29 | $this->addFieldMapping('field_splash_image', 'splash'); |
30 | 30 | $this->addFieldMapping('field_splash_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
31 | - $this->addFieldMapping('field_splash_image:source_dir')->defaultValue($import_path . 'images'); |
|
31 | + $this->addFieldMapping('field_splash_image:source_dir')->defaultValue($import_path.'images'); |
|
32 | 32 | $this->addFieldMapping('field_splash_image:destination_file', 'filename'); |
33 | 33 | // Associated Product |
34 | 34 | $this->addFieldMapping('field_commerce_product', 'commerce')->sourceMigration('DFSMEDCommerceNodes'); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | // Featured Image |
42 | 42 | $this->addFieldMapping('field_featured_image', 'image'); |
43 | 43 | $this->addFieldMapping('field_featured_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
44 | - $this->addFieldMapping('field_featured_image:source_dir')->defaultValue($import_path . 'images'); |
|
44 | + $this->addFieldMapping('field_featured_image:source_dir')->defaultValue($import_path.'images'); |
|
45 | 45 | $this->addFieldMapping('field_featured_image:destination_file', 'filename'); |
46 | 46 | // Persona |
47 | 47 | $this->addFieldMapping('field_persona', 'persona'); |
@@ -9,16 +9,16 @@ |
||
9 | 9 | public function __construct($arguments) { |
10 | 10 | parent::__construct($arguments); |
11 | 11 | $this->description = t('Import nodes.'); |
12 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
12 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
13 | 13 | // Create a MigrateSource object. |
14 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.nodes.slideshow.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
14 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.slideshow.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
15 | 15 | $this->destination = new MigrateDestinationNode('slideshow_slide'); |
16 | 16 | // Created |
17 | 17 | $this->addFieldMapping('created', 'created')->defaultValue(strtotime("now")); |
18 | 18 | // Main Image |
19 | 19 | $this->addFieldMapping('field_main_image', 'image'); |
20 | 20 | $this->addFieldMapping('field_main_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
21 | - $this->addFieldMapping('field_main_image:source_dir')->defaultValue($import_path . 'images'); |
|
21 | + $this->addFieldMapping('field_main_image:source_dir')->defaultValue($import_path.'images'); |
|
22 | 22 | $this->addFieldMapping('field_main_image:destination_file', 'filename'); |
23 | 23 | // Link |
24 | 24 | $this->addfieldmapping('field_link', 'link'); |
@@ -15,5 +15,5 @@ |
||
15 | 15 | $overrides["field_group.group_com_tabs|node|commerce|form.data|weight"] = 2; |
16 | 16 | $overrides["field_group.group_product|node|commerce|form.data|children|2"] = 'field_product_image'; |
17 | 17 | |
18 | - return $overrides; |
|
18 | + return $overrides; |
|
19 | 19 | } |
@@ -19,9 +19,9 @@ discard block |
||
19 | 19 | ), |
20 | 20 | MigrateDestinationNode::getKeySchema() |
21 | 21 | ); |
22 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
22 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
23 | 23 | // Create a MigrateSource object. |
24 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.nodes.series.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
24 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.series.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
25 | 25 | $this->destination = new MigrateDestinationNode('series'); |
26 | 26 | // Created |
27 | 27 | $this->addFieldMapping('created', 'created')->defaultValue(strtotime("now")); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | // Splash Image |
35 | 35 | $this->addFieldMapping('field_splash_image', 'splash'); |
36 | 36 | $this->addFieldMapping('field_splash_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
37 | - $this->addFieldMapping('field_splash_image:source_dir')->defaultValue($import_path . 'images'); |
|
37 | + $this->addFieldMapping('field_splash_image:source_dir')->defaultValue($import_path.'images'); |
|
38 | 38 | $this->addFieldMapping('field_splash_image:destination_file', 'filename'); |
39 | 39 | // Series Episodes |
40 | 40 | $this->addFieldMapping('field_series_episodes', 'episodes')->separator(',')->sourceMigration('DFSMEDEpisodeNodes'); |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | * Implements hook_migrate_api(). |
27 | 27 | */ |
28 | 28 | function dfs_med_migrate_api() { |
29 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
29 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
30 | 30 | $api = array( |
31 | 31 | 'api' => 2, |
32 | 32 | 'groups' => array( |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | 'DFSMEDProducts' => array('class_name' => 'DFSMEDProducts', 'group_name' => 'dfs_med'), |
48 | 48 | 'DFSMEDSeriesNodes' => array('class_name' => 'DFSMEDSeriesNodes', 'group_name' => 'dfs_med'), |
49 | 49 | 'DFSMEDSlideshowNodes' => array('class_name' => 'DFSMEDSlideshowNodes', 'group_name' => 'dfs_med'), |
50 | - 'DFSMEDUserPictures' => array('class_name' => 'DFUserPictures', 'path' => $import_path . 'dfs_med.users.csv', 'group_name' => 'dfs_med'), |
|
51 | - 'DFSMEDUsers' => array('class_name' => 'DFUsers', 'path' => $import_path . 'dfs_med.users.csv', 'picture_source' => 'DFSMEDUserPictures', 'group_name' => 'dfs_med'), |
|
50 | + 'DFSMEDUserPictures' => array('class_name' => 'DFUserPictures', 'path' => $import_path.'dfs_med.users.csv', 'group_name' => 'dfs_med'), |
|
51 | + 'DFSMEDUsers' => array('class_name' => 'DFUsers', 'path' => $import_path.'dfs_med.users.csv', 'picture_source' => 'DFSMEDUserPictures', 'group_name' => 'dfs_med'), |
|
52 | 52 | ), |
53 | 53 | ); |
54 | 54 | return $api; |
@@ -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_med') . '/import/'; |
|
13 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.terms.persona.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
12 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
13 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.terms.persona.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
14 | 14 | $this->destination = new MigrateDestinationTerm('persona'); |
15 | 15 | $this->addFieldMapping('name', 'name'); |
16 | 16 | } |
@@ -10,14 +10,14 @@ |
||
10 | 10 | public function __construct($arguments) { |
11 | 11 | parent::__construct($arguments); |
12 | 12 | $this->description = t('Import translated 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.translations.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_wem.nodes.wem_contest.translations.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'); |
@@ -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 |