Mercurial > hg > isophonics-drupal-site
comparison core/modules/migrate/src/Event/MigratePostRowSaveEvent.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 post-save event for event listeners. | |
11 */ | |
12 class MigratePostRowSaveEvent extends MigratePreRowSaveEvent { | |
13 | |
14 /** | |
15 * The row's destination ID. | |
16 * | |
17 * @var array|bool | |
18 */ | |
19 protected $destinationIdValues = []; | |
20 | |
21 /** | |
22 * Constructs a post-save event object. | |
23 * | |
24 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
25 * Migration entity. | |
26 * @param \Drupal\migrate\MigrateMessageInterface $message | |
27 * The message interface. | |
28 * @param \Drupal\migrate\Row $row | |
29 * Row object. | |
30 * @param array|bool $destination_id_values | |
31 * Values represent the destination ID. | |
32 */ | |
33 public function __construct(MigrationInterface $migration, MigrateMessageInterface $message, Row $row, $destination_id_values) { | |
34 parent::__construct($migration, $message, $row); | |
35 $this->destinationIdValues = $destination_id_values; | |
36 } | |
37 | |
38 /** | |
39 * Gets the destination ID values. | |
40 * | |
41 * @return array | |
42 * The destination ID as an array. | |
43 */ | |
44 public function getDestinationIdValues() { | |
45 return $this->destinationIdValues; | |
46 } | |
47 | |
48 } |