Browse Source

popsu_migrate: D7ParagrapheTextsProgramme D7NodeProgramme cleaned

bach 3 years ago
parent
commit
65b11b15e4

+ 1 - 10
web/modules/custom/popsu_migrate/src/Plugin/migrate/source/D7NodeProgramme.php

@@ -3,19 +3,10 @@
 
 namespace Drupal\popsu_migrate\Plugin\migrate\source;
 
-use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\migrate\Row;
-use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity;
-use Drupal\Core\Database\Query\SelectInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\Core\Extension\ModuleHandler;
-use Drupal\Core\State\StateInterface;
-use Drupal\migrate\Plugin\MigrationInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Logger\LoggerChannelFactoryInterface;
 use Drush\Drush;
 
-use Drupal\popsu_migrate\Plugin\migrate\source\D7Programme;
+// use Drupal\popsu_migrate\Plugin\migrate\source\D7Programme;
 
 /**
  * Drupal 7 node source from database.

+ 1 - 16
web/modules/custom/popsu_migrate/src/Plugin/migrate/source/D7PargrapheTextsProgramme.php

@@ -3,19 +3,10 @@
 
 namespace Drupal\popsu_migrate\Plugin\migrate\source;
 
-use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\migrate\Row;
-use Drupal\migrate_drupal\Plugin\migrate\source\d7\FieldableEntity;
-use Drupal\Core\Database\Query\SelectInterface;
-use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\Core\Extension\ModuleHandler;
-use Drupal\Core\State\StateInterface;
-use Drupal\migrate\Plugin\MigrationInterface;
-use Symfony\Component\DependencyInjection\ContainerInterface;
-use Drupal\Core\Logger\LoggerChannelFactoryInterface;
 use Drush\Drush;
 
-use Drupal\popsu_migrate\Plugin\migrate\source\D7Programme;
+// use Drupal\popsu_migrate\Plugin\migrate\source\D7Programme;
 
 /**
  * Drupal 7 node source from database.
@@ -34,14 +25,9 @@ class D7PargrapheTextsProgramme extends D7Programme {
     $nid = $row->getSourceProperty('nid');
     $vid = $row->getSourceProperty('vid');
     $type = $row->getSourceProperty('type');
-    // $title = $row->getSourceProperty('title');
-    // drush_print('-- '.$nid."\t".$title);
 
     // Get Field API field values.
     foreach ($this->getFields('node', $type) as $field_name => $field) {
-      // Ensure we're using the right language if the entity and the field are
-      // translatable.
-      // $field_language = $entity_translatable && $field['translatable'] ? $language : NULL;
       $row->setSourceProperty($field_name, $this->getFieldValues('node', $field_name, $nid, $vid, NULL));
     }
 
@@ -50,7 +36,6 @@ class D7PargrapheTextsProgramme extends D7Programme {
     $row->setSourceProperty('text', $text[0]['value']);
     $row->setSourceProperty('text_summary', $text[0]['summary']);
 
-
     return parent::prepareRow($row);
   }