summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-02-02 06:27:58 (GMT)
committerNathaniel Catchpole2016-02-02 06:27:58 (GMT)
commita3bbaae26f1d63297b98dd60553f4d822c0b872c (patch)
treeec819bae6a12378f8dee457d787422d99ea15961
parent7da92b577513ead89fb2d1418acc480a26ee8727 (diff)
Issue #2618830 by webflo, jan.stoeckler: Term widget migration should depend on tags property
-rw-r--r--core/modules/migrate_drupal/tests/fixtures/drupal6.php2
-rw-r--r--core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml9
-rw-r--r--core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php5
3 files changed, 13 insertions, 3 deletions
diff --git a/core/modules/migrate_drupal/tests/fixtures/drupal6.php b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
index 76b3bf6..84fe7c1 100644
--- a/core/modules/migrate_drupal/tests/fixtures/drupal6.php
+++ b/core/modules/migrate_drupal/tests/fixtures/drupal6.php
@@ -34054,7 +34054,7 @@ $connection->insert('vocabulary')
'hierarchy' => '1',
'multiple' => '1',
'required' => '0',
- 'tags' => '0',
+ 'tags' => '1',
'module' => 'taxonomy',
'weight' => '5',
))
diff --git a/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml b/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml
index 1b9f5ef..2608877 100644
--- a/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml
+++ b/core/modules/taxonomy/migration_templates/d6_vocabulary_entity_form_display.yml
@@ -8,12 +8,17 @@ source:
entity_type: node
form_mode: default
options:
- type: options_select
weight: 20
process:
entity_type: 'constants/entity_type'
form_mode: 'constants/form_mode'
- options: 'constants/options'
+ options/type:
+ plugin: static_map
+ source: tags
+ map:
+ 0: options_select
+ 1: entity_reference_autocomplete_tags
+ options/weight: 'constants/options/weight'
bundle: type
field_name:
plugin: migration
diff --git a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
index dc010dc..7ecea1b 100644
--- a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
+++ b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateVocabularyEntityFormDisplayTest.php
@@ -41,6 +41,11 @@ class MigrateVocabularyEntityFormDisplayTest extends MigrateDrupal6TestBase {
$this->assertIdentical(20, $component['weight']);
// Test the Id map.
$this->assertIdentical(array('node', 'article', 'default', 'tags'), Migration::load('d6_vocabulary_entity_form_display')->getIdMap()->lookupDestinationID(array(4, 'article')));
+
+ // Test the term widget tags setting.
+ $entity_form_display = EntityFormDisplay::load('node.story.default');
+ $this->assertIdentical($entity_form_display->getComponent('vocabulary_1_i_0_')['type'], 'options_select');
+ $this->assertIdentical($entity_form_display->getComponent('vocabulary_2_i_1_')['type'], 'entity_reference_autocomplete_tags');
}
}