@@ -15,7 +15,7 @@ class UserPreImport implements EventSubscriberInterface {
}
public function onPreImport(MigrateImportEvent $event) {
- /** @var \Drupal\reinstall\Plugin\migrate\source\ReinstallUserSource $plugin */
+ /** @var \Drupal\reinstall\Plugin\migrate\source\ReinstallUserSourceBase $plugin */
$plugin = $event->getMigration()->getSourcePlugin();
$plugin->records = array_filter($plugin->records, [$this, 'filter01']);
return;
@@ -1,14 +0,0 @@
-<?php
-
-namespace Drupal\reinstall\Plugin\migrate\source;
-/**
- * Source plugin for files from a YAML file.
- *
- * @MigrateSource(
- * id = "reinstall_files"
- * )
- */
-class ReinstallFileSource extends SimpleSource {
-}
- * Source plugin for nodes from a YAML file.
- * id = "reinstall_node"
-class ReinstallNodeSource extends SimpleSource {
- * Source plugin for terms from a YAML file.
- * id = "reinstall_paragraphs"
-class ReinstallParagraphSource extends SimpleSource {
@@ -15,8 +15,12 @@ use Symfony\Component\Yaml\Yaml;
/**
* Class SimpleSource provides the basic mechanisms to load a YML entity dump.
+ *
+ * @MigrateSource(
+ * id = "reinstall_base"
+ * )
*/
-abstract class SimpleSource extends SourcePluginBase implements ContainerFactoryPluginInterface {
+class ReinstallSourceBase extends SourcePluginBase implements ContainerFactoryPluginInterface {
use SimpleSourceTrait;
@@ -1,17 +0,0 @@
-use Drupal\migrate\Plugin\MigrationInterface;
-use Symfony\Component\EventDispatcher\EventDispatcherInterface;
- * id = "reinstall_terms"
-class ReinstallTermSource extends SimpleSource {
- * Source plugin for users from a YAML file.
- * id = "reinstall_users"
-class ReinstallUserSource extends SimpleSource {
@@ -1,10 +1,4 @@
<?php
- * Created by PhpStorm.
- * User: fgm
- * Date: 11/04/2017
- * Time: 08:35
namespace Drupal\reinstall\Plugin\migrate\source;