comparison core/modules/migrate/src/Event/MigratePreRowSaveEvent.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
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 }