diff --git a/src/EventSubscriber/MigrationSubscriber.php b/src/EventSubscriber/MigrationSubscriber.php index b65d83c..1c4b84b 100644 --- a/src/EventSubscriber/MigrationSubscriber.php +++ b/src/EventSubscriber/MigrationSubscriber.php @@ -9,10 +9,23 @@ use Drupal\migrate\Event\MigrateEvents; use Drupal\migrate\Event\MigratePostRowSaveEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; +/** + * Create a simplenews field on relevant content types. + * + * Since simplenews configuration on a node is stored as a field, it has to + * be added explicitly during a migration. This listener checks if the node + * type is a simplenews content type and adds the field. + */ class MigrationSubscriber implements EventSubscriberInterface { protected $entityFieldManager; + /** + * Constructs a new migration subscriber. + * + * @param \Drupal\Core\Entity\EntityFieldManagerInterface $entityFieldManager + * The entity field manager service. + */ public function __construct(EntityFieldManagerInterface $entityFieldManager) { $this->entityFieldManager = $entityFieldManager; }