3 namespace Drupal\migrate_plus\Event;
5 use Drupal\migrate\Plugin\MigrationInterface;
6 use Drupal\migrate\Plugin\MigrateSourceInterface;
7 use Drupal\migrate\Row;
8 use Symfony\Component\EventDispatcher\Event;
11 * Wraps a prepare-row event for event listeners.
13 class MigratePrepareRowEvent extends Event {
18 * @var \Drupal\migrate\Row
23 * Migration source plugin.
25 * @var \Drupal\migrate\Plugin\MigrateSourceInterface
32 * @var \Drupal\migrate\Plugin\MigrationInterface
37 * Constructs a prepare-row event object.
39 * @param \Drupal\migrate\Row $row
40 * Row of source data to be analyzed/manipulated.
42 * @param \Drupal\migrate\Plugin\MigrateSourceInterface $source
43 * Source plugin that is the source of the event.
45 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
48 public function __construct(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
50 $this->source = $source;
51 $this->migration = $migration;
55 * Gets the row object.
57 * @return \Drupal\migrate\Row
58 * The row object about to be imported.
60 public function getRow() {
65 * Gets the source plugin.
67 * @return \Drupal\migrate\Plugin\MigrateSourceInterface
68 * The source plugin firing the event.
70 public function getSource() {
75 * Gets the migration plugin.
77 * @return \Drupal\migrate\Plugin\MigrationInterface
78 * The migration entity being imported.
80 public function getMigration() {
81 return $this->migration;