Commit 05a8db29 authored by webchick's avatar webchick

Issue #2534004 by phenaproxima, mikeryan: Move module-specific migration...

Issue #2534004 by phenaproxima, mikeryan: Move module-specific migration support into the comment module
parent ce9a128e
migrate.source.d6_comment:
type: migrate_source_sql
label: 'Drupal 6 comment'
mapping:
constants:
type: mapping
label: 'Constants'
mapping:
entity_type:
type: string
label: 'Entity type'
migrate.source.d6_comment_variable_per_comment_type:
type: migrate_source_sql
label: 'Drupal 6 comment variable'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_comment_entity_form_display_subject:
type: migrate_source_sql
label: 'Drupal 6 comment subject entity form display'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_comment_variable:
type: migrate_source_sql
label: 'Drupal 6 comment variable'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
......@@ -17,7 +17,6 @@ process:
field_name: 'constants/field_name'
view_mode: 'constants/view_mode'
options: 'constants/options'
bundle: node_type
destination:
plugin: component_entity_display
......
......@@ -16,7 +16,6 @@ process:
field_name: 'constants/field_name'
form_mode: 'constants/form_mode'
options: 'constants/options'
bundle: node_type
destination:
plugin: component_entity_form_display
......
......@@ -16,7 +16,6 @@ process:
field_name: 'constants/field_name'
form_mode: 'constants/form_mode'
options: 'constants/options'
hidden:
plugin: static_map
source: comment_type
......
......@@ -12,7 +12,6 @@ process:
entity_type: 'constants/entity_type'
label: 'constants/label'
required: 'constants/required'
field_name:
plugin: static_map
source: comment_subject_field
......
......@@ -2,16 +2,16 @@
/**
* @file
* Contains \Drupal\migrate\Plugin\migrate\destination\EntityComment.
* Contains \Drupal\comment\Plugin\migrate\destination\EntityComment.
*/
namespace Drupal\migrate\Plugin\migrate\destination;
namespace Drupal\comment\Plugin\migrate\destination;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\State\StateInterface;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\Plugin\MigratePluginManager;
use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
use Drupal\migrate\Row;
use Symfony\Component\DependencyInjection\ContainerInterface;
......@@ -44,8 +44,6 @@ class EntityComment extends EntityContentBase {
* The storage for this entity type.
* @param array $bundles
* The list of bundles this entity type has.
* @param \Drupal\migrate\Plugin\MigratePluginManager $plugin_manager
* The migrate plugin manager.
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
* The entity manager service.
* @param \Drupal\Core\State\StateInterface $state
......
......@@ -2,11 +2,12 @@
/**
* @file
* Contains \Drupal\migrate\Plugin\migrate\destination\EntityCommentType.
* Contains \Drupal\comment\Plugin\migrate\destination\EntityCommentType.
*/
namespace Drupal\migrate\Plugin\migrate\destination;
namespace Drupal\comment\Plugin\migrate\destination;
use Drupal\migrate\Plugin\migrate\destination\EntityConfigBase;
use Drupal\migrate\Row;
/**
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\Comment.
* Contains \Drupal\comment\Plugin\migrate\source\d6\Comment.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\comment\Plugin\migrate\source\d6;
use Drupal\migrate\Row;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\CommentVariable.
* Contains \Drupal\comment\Plugin\migrate\source\d6\CommentVariable.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\comment\Plugin\migrate\source\d6;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
use Drupal\migrate\Plugin\migrate\source\DummyQueryTrait;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\CommentVariablePerCommentType.
* Contains \Drupal\comment\Plugin\migrate\source\d6\CommentVariablePerCommentType.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\comment\Plugin\migrate\source\d6;
/**
* @MigrateSource(
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
use Drupal\comment\Tests\CommentTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade comments.
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentTypeTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentTypeTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
use Drupal\comment\Entity\CommentType;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade comment type.
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentTypeTest extends MigrateDrupal6TestBase {
......
......@@ -2,10 +2,12 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableDisplayBase.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableDisplayBase.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Base class for Drupal 6 comment variables to Drupal 8 entity display tests.
......
......@@ -2,15 +2,15 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableEntityDisplayTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableEntityDisplayTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
/**
* Upgrade comment variables to entity.display.node.*.default.yml.
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentVariableEntityDisplayTest extends MigrateCommentVariableDisplayBase {
......
......@@ -2,15 +2,17 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableEntityFormDisplaySubjectTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableEntityFormDisplaySubjectTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade comment subject variable to core.entity_form_display.comment.*.default.yml
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentVariableEntityFormDisplaySubjectTest extends MigrateDrupal6TestBase {
......
......@@ -2,15 +2,15 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableEntityFormDisplayTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableEntityFormDisplayTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
/**
* Upgrade comment variables to core.entity_form_display.node.*.default.yml.
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentVariableEntityFormDisplayTest extends MigrateCommentVariableDisplayBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableFieldTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableFieldTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade comment variables to field.storage.node.comment.yml.
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentVariableFieldTest extends MigrateDrupal6TestBase {
......
......@@ -2,15 +2,17 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateCommentVariableInstanceTest.
* Contains \Drupal\comment\Tests\Migrate\d6\MigrateCommentVariableInstanceTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\comment\Tests\Migrate\d6;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade comment variables to field.instance.node.*.comment.yml.
*
* @group migrate_drupal
* @group comment
*/
class MigrateCommentVariableInstanceTest extends MigrateDrupal6TestBase {
......
......@@ -2,15 +2,15 @@
/**
* @file
* Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\CommentSourceWithHighWaterTest.
* Contains \Drupal\Tests\comment\Unit\Migrate\d6\CommentSourceWithHighWaterTest.
*/
namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
namespace Drupal\Tests\comment\Unit\Migrate\d6;
/**
* Tests the Drupal 6 comment source w/ high water handling.
*
* @group migrate_drupal
* @group comment
*/
class CommentSourceWithHighWaterTest extends CommentTestBase {
......
......@@ -2,15 +2,15 @@
/**
* @file
* Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\CommentTest.
* Contains \Drupal\Tests\comment\Unit\Migrate\d6\CommentTest.
*/
namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
namespace Drupal\Tests\comment\Unit\Migrate\d6;
/**
* Tests D6 comment source plugin.
*
* @group migrate_drupal
* @group comment
*/
class CommentTest extends CommentTestBase {
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\Tests\migrate_drupal\Unit\source\d6\CommentTestBase.
* Contains \Drupal\Tests\comment\Unit\Migrate\d6\CommentTestBase.
*/
namespace Drupal\Tests\migrate_drupal\Unit\source\d6;
namespace Drupal\Tests\comment\Unit\Migrate\d6;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
......@@ -16,7 +16,7 @@ abstract class CommentTestBase extends MigrateSqlSourceTestCase {
// The plugin system is not working during unit testing so the source plugin
// class needs to be manually specified.
const PLUGIN_CLASS = 'Drupal\migrate_drupal\Plugin\migrate\source\d6\Comment';
const PLUGIN_CLASS = 'Drupal\comment\Plugin\migrate\source\d6\Comment';
// The fake Migration configuration entity.
protected $migrationConfiguration = array(
......
......@@ -39,34 +39,6 @@ migrate.source.variable:
type: string
label: 'Slash'
migrate.source.d6_comment:
type: migrate_source_sql
label: 'Drupal 6 comment'
mapping:
constants:
type: mapping
label: 'Constants'
mapping:
entity_type:
type: string
label: 'Entity type'
migrate.source.d6_comment_variable_per_comment_type:
type: migrate_source_sql
label: 'Drupal 6 comment variable'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_comment_entity_form_display_subject:
type: migrate_source_sql
label: 'Drupal 6 comment subject entity form display'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_field_instance_per_form_display:
type: migrate_source_sql
label: 'Drupal 6 field instance form display'
......@@ -94,14 +66,6 @@ migrate.source.variable_multirow:
type: string
label: 'Variable'
migrate.source.d6_comment_variable:
type: migrate_source_sql
label: 'Drupal 6 comment variable'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_field_formatter_settings:
type: migrate_source_sql
label: 'Drupal 6 field formatter settings'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment