@@ -10,31 +10,31 @@ |
||
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_med') . '/import/'; |
|
13 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
14 | 14 | // Create a MigrateSource object. |
15 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.nodes.brand.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
15 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.brand.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
16 | 16 | $this->destination = new MigrateDestinationNode('brand'); |
17 | 17 | // Created |
18 | 18 | $this->addFieldMapping('created', 'created')->defaultValue(strtotime("now")); |
19 | 19 | // Logo Image |
20 | 20 | $this->addFieldMapping('field_logo', 'logo'); |
21 | 21 | $this->addFieldMapping('field_logo:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
22 | - $this->addFieldMapping('field_logo:source_dir')->defaultValue($import_path . 'images'); |
|
22 | + $this->addFieldMapping('field_logo:source_dir')->defaultValue($import_path.'images'); |
|
23 | 23 | $this->addFieldMapping('field_logo:destination_file', 'filename'); |
24 | 24 | // Splash Image |
25 | 25 | $this->addFieldMapping('field_splash_image', 'splash'); |
26 | 26 | $this->addFieldMapping('field_splash_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
27 | - $this->addFieldMapping('field_splash_image:source_dir')->defaultValue($import_path . 'images'); |
|
27 | + $this->addFieldMapping('field_splash_image:source_dir')->defaultValue($import_path.'images'); |
|
28 | 28 | $this->addFieldMapping('field_splash_image:destination_file', 'filename'); |
29 | 29 | // Superbrand Link Image |
30 | 30 | $this->addfieldmapping('field_link_image', 'link_image'); |
31 | 31 | $this->addfieldmapping('field_link_image:file_replace')->defaultvalue(FILE_EXISTS_REPLACE); |
32 | - $this->addfieldmapping('field_link_image:source_dir')->defaultvalue($import_path . 'images'); |
|
32 | + $this->addfieldmapping('field_link_image:source_dir')->defaultvalue($import_path.'images'); |
|
33 | 33 | $this->addfieldmapping('field_link_image:destination_file', 'filename'); |
34 | 34 | // Superbrand Link Image |
35 | 35 | $this->addfieldmapping('field_link_image_hover', 'link_image_hover'); |
36 | 36 | $this->addfieldmapping('field_link_image_hover:file_replace')->defaultvalue(FILE_EXISTS_REPLACE); |
37 | - $this->addfieldmapping('field_link_image_hover:source_dir')->defaultvalue($import_path . 'images'); |
|
37 | + $this->addfieldmapping('field_link_image_hover:source_dir')->defaultvalue($import_path.'images'); |
|
38 | 38 | $this->addfieldmapping('field_link_image_hover:destination_file', 'filename'); |
39 | 39 | // Booleans |
40 | 40 | $this->addfieldmapping('field_superbrand', 'superbrand'); |
@@ -19,11 +19,11 @@ |
||
19 | 19 | MigrateDestinationFile::getKeySchema() |
20 | 20 | ); |
21 | 21 | $this->destination = new MigrateDestinationFile('image'); |
22 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
23 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.files.image.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
22 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
23 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.files.image.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
24 | 24 | $this->addFieldMapping('value', 'image'); |
25 | 25 | $this->addFieldMapping('file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
26 | - $this->addFieldMapping('source_dir')->defaultValue($import_path . 'images'); |
|
26 | + $this->addFieldMapping('source_dir')->defaultValue($import_path.'images'); |
|
27 | 27 | $this->addFieldMapping('destination_file', 'image'); |
28 | 28 | } |
29 | 29 |
@@ -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.article.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
24 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.article.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
25 | 25 | $this->destination = new MigrateDestinationNode('article'); |
26 | 26 | // Override body:format |
27 | 27 | $this->addFieldMapping('body:format')->defaultValue('full_html'); |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | // Image |
31 | 31 | $this->addFieldMapping('field_image', 'image'); |
32 | 32 | $this->addFieldMapping('field_image:file_replace')->defaultValue(FILE_EXISTS_REPLACE); |
33 | - $this->addFieldMapping('field_image:source_dir')->defaultValue($import_path . 'images'); |
|
33 | + $this->addFieldMapping('field_image:source_dir')->defaultValue($import_path.'images'); |
|
34 | 34 | $this->addFieldMapping('field_image:destination_file', 'filename'); |
35 | 35 | // Headlines |
36 | 36 | $this->addfieldmapping('field_headline', 'headlines'); |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | ), |
74 | 74 | MigrateDestinationComment::getKeySchema() |
75 | 75 | ); |
76 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
77 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.comments.article.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
76 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
77 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.comments.article.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
78 | 78 | $this->destination = new MigrateDestinationComment('comment_node_article'); |
79 | 79 | $this->addFieldMapping('nid', 'node')->sourceMigration('DFSMEDEditorialNodes'); |
80 | 80 | $this->addFieldMapping('uid', 'author')->sourceMigration('DFSMEDUsers'); |
@@ -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'); |
@@ -22,10 +22,10 @@ discard block |
||
22 | 22 | MigrateDestinationNode::getKeySchema() |
23 | 23 | ); |
24 | 24 | |
25 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
25 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
26 | 26 | |
27 | 27 | // Create a MigrateSource object. |
28 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.nodes.episode.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
28 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.episode.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
29 | 29 | $this->destination = new MigrateDestinationNode('episode'); |
30 | 30 | |
31 | 31 | // Created |
@@ -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 | |
40 | 40 | // Metadata |
@@ -86,8 +86,8 @@ discard block |
||
86 | 86 | MigrateDestinationFile::getKeySchema() |
87 | 87 | ); |
88 | 88 | $this->destination = new MigrateDestinationFile('video', 'MigrateExtrasFileYoutube'); |
89 | - $import_path = drupal_get_path('module', 'dfs_med') . '/import/'; |
|
90 | - $this->source = new MigrateSourceCSV($import_path . 'dfs_med.nodes.episode.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
89 | + $import_path = drupal_get_path('module', 'dfs_med').'/import/'; |
|
90 | + $this->source = new MigrateSourceCSV($import_path.'dfs_med.nodes.episode.csv', $this->csvcolumns(), array('header_rows' => 1)); |
|
91 | 91 | $this->addFieldMapping('value', 'video'); |
92 | 92 | } |
93 | 93 |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | $block['content'] = ' |
25 | 25 | <div class="user-header-block"> |
26 | 26 | <div class="uh-container"> |
27 | - <a data-dropdown="drop1" class="user-name med-user parent">' . $user->name . '</a> |
|
27 | + <a data-dropdown="drop1" class="user-name med-user parent">' . $user->name.'</a> |
|
28 | 28 | <ul id="drop1" class="f-dropdown" data-dropdown-content> |
29 | 29 | <li class="dropdown"><a href="/user">My Profile</a> |
30 | 30 | </li> |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | </ul> |
34 | 34 | </div> |
35 | 35 | <div class="uh-container"> |
36 | - | <a class="shows" href="/user/' . $user->uid . '/my-shows">My Shows</a> |
|
36 | + | <a class="shows" href="/user/' . $user->uid.'/my-shows">My Shows</a> |
|
37 | 37 | </div> |
38 | 38 | </div> |
39 | 39 | '; |
@@ -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; |