Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / migrate / src / Event / MigratePreRowSaveEvent.php
1 <?php
2
3 namespace Drupal\migrate\Event;
4
5 use Drupal\migrate\Plugin\MigrationInterface;
6 use Drupal\migrate\MigrateMessageInterface;
7 use Drupal\migrate\Row;
8
9 /**
10  * Wraps a pre-save event for event listeners.
11  */
12 class MigratePreRowSaveEvent extends EventBase {
13
14   /**
15    * Row object.
16    *
17    * @var \Drupal\migrate\Row
18    */
19   protected $row;
20
21   /**
22    * Constructs a pre-save event object.
23    *
24    * @param \Drupal\migrate\Plugin\MigrationInterface $migration
25    *   Migration entity.
26    * @param \Drupal\migrate\MigrateMessageInterface $message
27    *   The current migrate message service.
28    * @param \Drupal\migrate\Row $row
29    */
30   public function __construct(MigrationInterface $migration, MigrateMessageInterface $message, Row $row) {
31     parent::__construct($migration, $message);
32     $this->row = $row;
33   }
34
35   /**
36    * Gets the row object.
37    *
38    * @return \Drupal\migrate\Row
39    *   The row object about to be imported.
40    */
41   public function getRow() {
42     return $this->row;
43   }
44
45 }