Update to Drupal 8.1.8. For more information, see https://www.drupal.org/project/drupal/releases/8.1.8
This commit is contained in:
parent
e9f047ccf8
commit
f9f23cdf38
312 changed files with 6751 additions and 1546 deletions
|
@ -37,6 +37,13 @@ class CckMigration extends Migration implements ContainerFactoryPluginInterface
|
|||
*/
|
||||
protected $cckPluginCache;
|
||||
|
||||
/**
|
||||
* The cckfield plugin manager.
|
||||
*
|
||||
* @var \Drupal\migrate\Plugin\MigratePluginManager
|
||||
*/
|
||||
protected $cckPluginManager;
|
||||
|
||||
/**
|
||||
* Constructs a CckMigration.
|
||||
*
|
||||
|
|
|
@ -8034,7 +8034,17 @@ $connection->insert('history')
|
|||
->values(array(
|
||||
'uid' => '1',
|
||||
'nid' => '9',
|
||||
'timestamp' => '1457655127',
|
||||
'timestamp' => '1468384961',
|
||||
))
|
||||
->values(array(
|
||||
'uid' => '1',
|
||||
'nid' => '12',
|
||||
'timestamp' => '1468384823',
|
||||
))
|
||||
->values(array(
|
||||
'uid' => '1',
|
||||
'nid' => '13',
|
||||
'timestamp' => '1468384931',
|
||||
))
|
||||
->execute();
|
||||
|
||||
|
@ -34709,7 +34719,7 @@ $connection->insert('menu_router')
|
|||
'access_callback' => 'user_access',
|
||||
'access_arguments' => 'a:1:{i:0;s:24:"administer content types";}',
|
||||
'page_callback' => 'drupal_get_form',
|
||||
'page_arguments' => 'a:2:{i:0;s:14:"node_type_form";i:1;O:8:"stdClass":14:{s:4:"type";s:7:"company";s:4:"name";s:7:"Company";s:6:"module";s:4:"node";s:11:"description";s:17:"Company node type";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:4:"Name";s:8:"has_body";s:1:"1";s:10:"body_label";s:11:"Description";s:14:"min_word_count";s:2:"20";s:6:"custom";s:1:"0";s:8:"modified";s:1:"0";s:6:"locked";s:1:"0";s:9:"orig_type";s:7:"company";}}',
|
||||
'page_arguments' => 'a:2:{i:0;s:14:"node_type_form";i:1;O:8:"stdClass":14:{s:4:"type";s:7:"company";s:4:"name";s:7:"Company";s:6:"module";s:4:"node";s:11:"description";s:17:"Company node type";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:4:"Name";s:8:"has_body";s:1:"1";s:10:"body_label";s:11:"Description";s:14:"min_word_count";s:1:"0";s:6:"custom";s:1:"0";s:8:"modified";s:1:"1";s:6:"locked";s:1:"0";s:9:"orig_type";s:7:"company";}}',
|
||||
'fit' => '15',
|
||||
'number_parts' => '4',
|
||||
'tab_parent' => '',
|
||||
|
@ -34731,7 +34741,7 @@ $connection->insert('menu_router')
|
|||
'access_callback' => 'user_access',
|
||||
'access_arguments' => 'a:1:{i:0;s:24:"administer content types";}',
|
||||
'page_callback' => 'drupal_get_form',
|
||||
'page_arguments' => 'a:2:{i:0;s:24:"node_type_delete_confirm";i:1;O:8:"stdClass":14:{s:4:"type";s:7:"company";s:4:"name";s:7:"Company";s:6:"module";s:4:"node";s:11:"description";s:17:"Company node type";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:4:"Name";s:8:"has_body";s:1:"1";s:10:"body_label";s:11:"Description";s:14:"min_word_count";s:2:"20";s:6:"custom";s:1:"0";s:8:"modified";s:1:"0";s:6:"locked";s:1:"0";s:9:"orig_type";s:7:"company";}}',
|
||||
'page_arguments' => 'a:2:{i:0;s:24:"node_type_delete_confirm";i:1;O:8:"stdClass":14:{s:4:"type";s:7:"company";s:4:"name";s:7:"Company";s:6:"module";s:4:"node";s:11:"description";s:17:"Company node type";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:4:"Name";s:8:"has_body";s:1:"1";s:10:"body_label";s:11:"Description";s:14:"min_word_count";s:1:"0";s:6:"custom";s:1:"0";s:8:"modified";s:1:"1";s:6:"locked";s:1:"0";s:9:"orig_type";s:7:"company";}}',
|
||||
'fit' => '31',
|
||||
'number_parts' => '5',
|
||||
'tab_parent' => '',
|
||||
|
@ -34841,7 +34851,7 @@ $connection->insert('menu_router')
|
|||
'access_callback' => 'user_access',
|
||||
'access_arguments' => 'a:1:{i:0;s:24:"administer content types";}',
|
||||
'page_callback' => 'drupal_get_form',
|
||||
'page_arguments' => 'a:2:{i:0;s:14:"node_type_form";i:1;O:8:"stdClass":14:{s:4:"type";s:7:"company";s:4:"name";s:7:"Company";s:6:"module";s:4:"node";s:11:"description";s:17:"Company node type";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:4:"Name";s:8:"has_body";s:1:"1";s:10:"body_label";s:11:"Description";s:14:"min_word_count";s:2:"20";s:6:"custom";s:1:"0";s:8:"modified";s:1:"0";s:6:"locked";s:1:"0";s:9:"orig_type";s:7:"company";}}',
|
||||
'page_arguments' => 'a:2:{i:0;s:14:"node_type_form";i:1;O:8:"stdClass":14:{s:4:"type";s:7:"company";s:4:"name";s:7:"Company";s:6:"module";s:4:"node";s:11:"description";s:17:"Company node type";s:4:"help";s:0:"";s:9:"has_title";s:1:"1";s:11:"title_label";s:4:"Name";s:8:"has_body";s:1:"1";s:10:"body_label";s:11:"Description";s:14:"min_word_count";s:1:"0";s:6:"custom";s:1:"0";s:8:"modified";s:1:"1";s:6:"locked";s:1:"0";s:9:"orig_type";s:7:"company";}}',
|
||||
'fit' => '31',
|
||||
'number_parts' => '5',
|
||||
'tab_parent' => 'admin/content/node-type/company',
|
||||
|
@ -41334,6 +41344,40 @@ $connection->insert('node')
|
|||
'tnid' => '0',
|
||||
'translate' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '10',
|
||||
'vid' => '13',
|
||||
'type' => 'page',
|
||||
'language' => 'en',
|
||||
'title' => 'The Real McCoy',
|
||||
'uid' => '1',
|
||||
'status' => '1',
|
||||
'created' => '1444238800',
|
||||
'changed' => '1444238808',
|
||||
'comment' => '2',
|
||||
'promote' => '1',
|
||||
'moderate' => '0',
|
||||
'sticky' => '0',
|
||||
'tnid' => '10',
|
||||
'translate' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '11',
|
||||
'vid' => '14',
|
||||
'type' => 'page',
|
||||
'language' => 'fr',
|
||||
'title' => 'Le Vrai McCoy',
|
||||
'uid' => '1',
|
||||
'status' => '1',
|
||||
'created' => '1444239050',
|
||||
'changed' => '1444239050',
|
||||
'comment' => '2',
|
||||
'promote' => '1',
|
||||
'moderate' => '0',
|
||||
'sticky' => '0',
|
||||
'tnid' => '10',
|
||||
'translate' => '0',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('node_access', array(
|
||||
|
@ -41463,6 +41507,13 @@ $connection->insert('node_comment_statistics')
|
|||
'last_comment_uid',
|
||||
'comment_count',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '0',
|
||||
'last_comment_timestamp' => '1468384735',
|
||||
'last_comment_name' => NULL,
|
||||
'last_comment_uid' => '1',
|
||||
'comment_count' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '1',
|
||||
'last_comment_timestamp' => '1388271197',
|
||||
|
@ -41479,7 +41530,14 @@ $connection->insert('node_comment_statistics')
|
|||
))
|
||||
->values(array(
|
||||
'nid' => '9',
|
||||
'last_comment_timestamp' => '1444671588',
|
||||
'last_comment_timestamp' => '1444238800',
|
||||
'last_comment_name' => NULL,
|
||||
'last_comment_uid' => '1',
|
||||
'comment_count' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '10',
|
||||
'last_comment_timestamp' => '1444239050',
|
||||
'last_comment_name' => NULL,
|
||||
'last_comment_uid' => '1',
|
||||
'comment_count' => '0',
|
||||
|
@ -41727,6 +41785,28 @@ $connection->insert('node_revisions')
|
|||
'timestamp' => '1444671588',
|
||||
'format' => '1',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '10',
|
||||
'vid' => '13',
|
||||
'uid' => '1',
|
||||
'title' => 'The Real McCoy',
|
||||
'body' => "In the original, Queen's English.",
|
||||
'teaser' => "In the original, Queen's English.",
|
||||
'log' => '',
|
||||
'timestamp' => '1444238808',
|
||||
'format' => '1',
|
||||
))
|
||||
->values(array(
|
||||
'nid' => '11',
|
||||
'vid' => '14',
|
||||
'uid' => '1',
|
||||
'title' => 'Le Vrai McCoy',
|
||||
'body' => 'Ooh là là!',
|
||||
'teaser' => 'Ooh là là!',
|
||||
'log' => '',
|
||||
'timestamp' => '1444239050',
|
||||
'format' => '1',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('node_type', array(
|
||||
|
@ -41861,9 +41941,9 @@ $connection->insert('node_type')
|
|||
'title_label' => 'Name',
|
||||
'has_body' => '1',
|
||||
'body_label' => 'Description',
|
||||
'min_word_count' => '20',
|
||||
'min_word_count' => '0',
|
||||
'custom' => '0',
|
||||
'modified' => '0',
|
||||
'modified' => '1',
|
||||
'locked' => '0',
|
||||
'orig_type' => 'company',
|
||||
))
|
||||
|
@ -44465,8 +44545,8 @@ $connection->insert('users')
|
|||
'signature' => '',
|
||||
'signature_format' => '0',
|
||||
'created' => '0',
|
||||
'access' => '1458198052',
|
||||
'login' => '1458193160',
|
||||
'access' => '1468384823',
|
||||
'login' => '1468384420',
|
||||
'status' => '1',
|
||||
'timezone' => NULL,
|
||||
'language' => '',
|
||||
|
@ -44809,13 +44889,17 @@ $connection->insert('variable')
|
|||
'name' => 'comment_article',
|
||||
'value' => 's:1:"2";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_company',
|
||||
'value' => 's:1:"2";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_controls_article',
|
||||
'value' => 'i:3;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_controls_company',
|
||||
'value' => 'i:3;',
|
||||
'value' => 's:1:"3";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_controls_employee',
|
||||
|
@ -44855,7 +44939,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'comment_default_mode_company',
|
||||
'value' => 'i:4;',
|
||||
'value' => 's:1:"4";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_default_mode_employee',
|
||||
|
@ -44895,7 +44979,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'comment_default_order_company',
|
||||
'value' => 'i:1;',
|
||||
'value' => 's:1:"1";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_default_order_employee',
|
||||
|
@ -44935,7 +45019,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'comment_default_per_page_company',
|
||||
'value' => 'i:50;',
|
||||
'value' => 's:2:"50";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_default_per_page_employee',
|
||||
|
@ -44975,7 +45059,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'comment_form_location_company',
|
||||
'value' => 'i:0;',
|
||||
'value' => 's:1:"0";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_form_location_employee',
|
||||
|
@ -45019,7 +45103,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'comment_preview_company',
|
||||
'value' => 'i:1;',
|
||||
'value' => 's:1:"1";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_preview_employee',
|
||||
|
@ -45063,7 +45147,7 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'comment_subject_field_company',
|
||||
'value' => 'i:1;',
|
||||
'value' => 's:1:"1";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'comment_subject_field_employee',
|
||||
|
@ -45425,6 +45509,10 @@ $connection->insert('variable')
|
|||
'name' => 'event_nodeapi_article',
|
||||
'value' => 's:5:"never";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'event_nodeapi_company',
|
||||
'value' => 's:5:"never";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'event_nodeapi_event',
|
||||
'value' => 's:3:"all";',
|
||||
|
@ -45487,7 +45575,11 @@ $connection->insert('variable')
|
|||
))
|
||||
->values(array(
|
||||
'name' => 'form_build_id_article',
|
||||
'value' => 's:48:"form-mXZfFJxcCFGB80PPYtNOuwYbho6-xKTvrRLb3TAMkic";',
|
||||
'value' => 's:48:"form-t2zKJflpBD4rpYoGQH33ckjjWAYdo5lF3Hl1O_YnWyE";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'form_build_id_company',
|
||||
'value' => 's:48:"form-jFw2agRukPxjG5dG-N6joZLyoxXmCoxTzua0HUciqK0";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'forum_block_num_0',
|
||||
|
@ -45589,6 +45681,10 @@ $connection->insert('variable')
|
|||
'name' => 'node_options_book',
|
||||
'value' => 'a:1:{i:0;s:6:"status";}',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'node_options_company',
|
||||
'value' => 'a:2:{i:0;s:6:"status";i:1;s:7:"promote";}',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'node_options_forum',
|
||||
'value' => 'a:1:{i:0;s:6:"status";}',
|
||||
|
@ -45785,6 +45881,10 @@ $connection->insert('variable')
|
|||
'name' => 'upload_article',
|
||||
'value' => 'b:0;',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'upload_company',
|
||||
'value' => 's:1:"1";',
|
||||
))
|
||||
->values(array(
|
||||
'name' => 'upload_page',
|
||||
'value' => 'b:1;',
|
||||
|
|
|
@ -3474,7 +3474,7 @@ $connection->insert('field_config_instance')
|
|||
'field_name' => 'body',
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'article',
|
||||
'data' => 'a:6:{s:5:"label";s:4:"Body";s:6:"widget";a:4:{s:4:"type";s:26:"text_textarea_with_summary";s:8:"settings";a:2:{s:4:"rows";i:20;s:12:"summary_rows";i:5;}s:6:"weight";i:-4;s:6:"module";s:4:"text";}s:8:"settings";a:3:{s:15:"display_summary";b:1;s:15:"text_processing";i:1;s:18:"user_register_form";b:0;}s:7:"display";a:2:{s:7:"default";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:0;}s:6:"teaser";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:23:"text_summary_or_trimmed";s:8:"settings";a:1:{s:11:"trim_length";i:600;}s:6:"module";s:4:"text";s:6:"weight";i:0;}}s:8:"required";b:0;s:11:"description";s:0:"";}',
|
||||
'data' => 'a:6:{s:5:"label";s:4:"Body";s:6:"widget";a:4:{s:4:"type";s:26:"text_textarea_with_summary";s:8:"settings";a:2:{s:4:"rows";i:20;s:12:"summary_rows";i:5;}s:6:"weight";i:-4;s:6:"module";s:4:"text";}s:8:"settings";a:3:{s:15:"display_summary";b:1;s:15:"text_processing";i:1;s:18:"user_register_form";b:0;}s:7:"display";a:3:{s:7:"default";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:12:"text_default";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:0;}s:6:"teaser";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:23:"text_summary_or_trimmed";s:8:"settings";a:1:{s:11:"trim_length";i:600;}s:6:"module";s:4:"text";s:6:"weight";i:0;}s:6:"custom";a:5:{s:5:"label";s:6:"hidden";s:4:"type";s:23:"text_summary_or_trimmed";s:8:"settings";a:0:{}s:6:"module";s:4:"text";s:6:"weight";i:11;}}s:8:"required";b:0;s:11:"description";s:0:"";}',
|
||||
'deleted' => '0',
|
||||
))
|
||||
->values(array(
|
||||
|
@ -3720,6 +3720,24 @@ $connection->insert('field_config_instance')
|
|||
'data' => 'a:6:{s:5:"label";s:4:"File";s:6:"widget";a:5:{s:6:"weight";s:1:"8";s:4:"type";s:12:"file_generic";s:6:"module";s:4:"file";s:6:"active";i:1;s:8:"settings";a:1:{s:18:"progress_indicator";s:8:"throbber";}}s:8:"settings";a:5:{s:14:"file_directory";s:0:"";s:15:"file_extensions";s:3:"txt";s:12:"max_filesize";s:0:"";s:17:"description_field";i:0;s:18:"user_register_form";i:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"file_default";s:8:"settings";a:0:{}s:6:"module";s:4:"file";s:6:"weight";i:0;}}s:8:"required";i:0;s:11:"description";s:0:"";}',
|
||||
'deleted' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'id' => '34',
|
||||
'field_id' => '15',
|
||||
'field_name' => 'field_link',
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'article',
|
||||
'data' => 'a:7:{s:5:"label";s:4:"Link";s:6:"widget";a:5:{s:6:"weight";s:2:"10";s:4:"type";s:10:"link_field";s:6:"module";s:4:"link";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:12:{s:12:"absolute_url";i:1;s:12:"validate_url";i:1;s:3:"url";i:0;s:5:"title";s:8:"optional";s:11:"title_value";s:19:"Unused Static Title";s:27:"title_label_use_field_label";i:0;s:15:"title_maxlength";s:3:"128";s:7:"display";a:1:{s:10:"url_cutoff";s:2:"81";}s:10:"attributes";a:6:{s:6:"target";s:6:"_blank";s:3:"rel";s:8:"nofollow";s:18:"configurable_class";i:0;s:5:"class";s:7:"classes";s:18:"configurable_title";i:1;s:5:"title";s:0:"";}s:10:"rel_remove";s:19:"rel_remove_external";s:13:"enable_tokens";i:1;s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:12:"link_default";s:6:"weight";s:1:"9";s:8:"settings";a:0:{}s:6:"module";s:4:"link";}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
|
||||
'deleted' => '0',
|
||||
))
|
||||
->values(array(
|
||||
'id' => '35',
|
||||
'field_id' => '14',
|
||||
'field_name' => 'field_integer',
|
||||
'entity_type' => 'taxonomy_term',
|
||||
'bundle' => 'test_vocabulary',
|
||||
'data' => 'a:7:{s:5:"label";s:7:"Integer";s:6:"widget";a:5:{s:6:"weight";s:1:"2";s:4:"type";s:6:"number";s:6:"module";s:6:"number";s:6:"active";i:0;s:8:"settings";a:0:{}}s:8:"settings";a:5:{s:3:"min";s:0:"";s:3:"max";s:0:"";s:6:"prefix";s:0:"";s:6:"suffix";s:0:"";s:18:"user_register_form";b:0;}s:7:"display";a:1:{s:7:"default";a:5:{s:5:"label";s:5:"above";s:4:"type";s:14:"number_integer";s:8:"settings";a:4:{s:18:"thousand_separator";s:0:"";s:17:"decimal_separator";s:1:".";s:5:"scale";i:0;s:13:"prefix_suffix";b:1;}s:6:"module";s:6:"number";s:6:"weight";i:0;}}s:8:"required";i:0;s:11:"description";s:0:"";s:13:"default_value";N;}',
|
||||
'deleted' => '0',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('field_data_body', array(
|
||||
|
@ -4900,6 +4918,18 @@ $connection->insert('field_data_field_link')
|
|||
'field_link_title' => 'Click Here',
|
||||
'field_link_attributes' => 'a:1:{s:5:"title";s:10:"Click Here";}',
|
||||
))
|
||||
->values(array(
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'article',
|
||||
'deleted' => '0',
|
||||
'entity_id' => '2',
|
||||
'revision_id' => '2',
|
||||
'language' => 'und',
|
||||
'delta' => '0',
|
||||
'field_link_url' => '<front>',
|
||||
'field_link_title' => 'Home',
|
||||
'field_link_attributes' => 'a:0:{}',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('field_data_field_long_text', array(
|
||||
|
@ -6668,6 +6698,18 @@ $connection->insert('field_revision_field_link')
|
|||
'field_link_title' => 'Click Here',
|
||||
'field_link_attributes' => 'a:1:{s:5:"title";s:10:"Click Here";}',
|
||||
))
|
||||
->values(array(
|
||||
'entity_type' => 'node',
|
||||
'bundle' => 'article',
|
||||
'deleted' => '0',
|
||||
'entity_id' => '2',
|
||||
'revision_id' => '2',
|
||||
'language' => 'und',
|
||||
'delta' => '0',
|
||||
'field_link_url' => '<front>',
|
||||
'field_link_title' => 'Home',
|
||||
'field_link_attributes' => 'a:0:{}',
|
||||
))
|
||||
->execute();
|
||||
|
||||
$connection->schema()->createTable('field_revision_field_long_text', array(
|
||||
|
|
|
@ -4,7 +4,10 @@ namespace Drupal\Tests\migrate_drupal\Kernel\d6;
|
|||
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
use Drupal\field\Entity\FieldStorageConfig;
|
||||
use Drupal\migrate\MigrateExecutable;
|
||||
use Drupal\migrate\MigrateMessageInterface;
|
||||
use Drupal\user\Entity\User;
|
||||
use Prophecy\Argument;
|
||||
|
||||
/**
|
||||
* @group migrate_drupal
|
||||
|
@ -85,4 +88,40 @@ class EntityContentBaseTest extends MigrateDrupal6TestBase {
|
|||
$this->assertIdentical('proto@zo.an', $account->getInitialEmail());
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that translation destination fails for untranslatable entities.
|
||||
*/
|
||||
public function testUntranslatable() {
|
||||
$this->enableModules(['language_test']);
|
||||
$this->installEntitySchema('no_language_entity_test');
|
||||
|
||||
/** @var MigrationInterface $migration */
|
||||
$migration = \Drupal::service('plugin.manager.migration')->createStubMigration([
|
||||
'source' => [
|
||||
'plugin' => 'embedded_data',
|
||||
'ids' => ['id' => ['type' => 'integer']],
|
||||
'data_rows' => [['id' => 1]],
|
||||
],
|
||||
'process' => [
|
||||
'id' => 'id',
|
||||
],
|
||||
'destination' => [
|
||||
'plugin' => 'entity:no_language_entity_test',
|
||||
'translations' => TRUE,
|
||||
],
|
||||
]);
|
||||
|
||||
$message = $this->prophesize(MigrateMessageInterface::class);
|
||||
// Match the expected message. Can't use default argument types, because
|
||||
// we need to convert to string from TranslatableMarkup.
|
||||
$argument = Argument::that(function($msg) {
|
||||
return strpos((string) $msg, "This entity type does not support translation") !== FALSE;
|
||||
});
|
||||
$message->display($argument, Argument::any())
|
||||
->shouldBeCalled();
|
||||
|
||||
$executable = new MigrateExecutable($migration, $message->reveal());
|
||||
$executable->import();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -89,17 +89,24 @@ abstract class MigrateDrupal6TestBase extends MigrateDrupalTestBase {
|
|||
/**
|
||||
* Executes all content migrations.
|
||||
*
|
||||
* @param bool $include_revisions
|
||||
* If TRUE, migrates node revisions.
|
||||
* @param array $include
|
||||
* Extra things to include as part of the migrations. Values may be
|
||||
* 'revisions' or 'translations'.
|
||||
*/
|
||||
protected function migrateContent($include_revisions = FALSE) {
|
||||
protected function migrateContent($include = []) {
|
||||
if (in_array('translations', $include)) {
|
||||
$this->executeMigrations(['language']);
|
||||
}
|
||||
$this->migrateUsers(FALSE);
|
||||
$this->migrateFields();
|
||||
|
||||
$this->installEntitySchema('node');
|
||||
$this->executeMigrations(['d6_node_settings', 'd6_node']);
|
||||
|
||||
if ($include_revisions) {
|
||||
if (in_array('translations', $include)) {
|
||||
$this->executeMigrations(['translations']);
|
||||
}
|
||||
if (in_array('revisions', $include)) {
|
||||
$this->executeMigrations(['d6_node_revision']);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue