Mercurial > hg > isophonics-drupal-site
comparison core/modules/migrate/src/Event/MigrateRowDeleteEvent.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 Symfony\Component\EventDispatcher\Event; | |
7 | |
8 /** | |
9 * Wraps a row deletion event for event listeners. | |
10 */ | |
11 class MigrateRowDeleteEvent extends Event { | |
12 | |
13 /** | |
14 * Migration entity. | |
15 * | |
16 * @var \Drupal\migrate\Plugin\MigrationInterface | |
17 */ | |
18 protected $migration; | |
19 | |
20 /** | |
21 * Values representing the destination ID. | |
22 * | |
23 * @var array | |
24 */ | |
25 protected $destinationIdValues; | |
26 | |
27 /** | |
28 * Constructs a row deletion event object. | |
29 * | |
30 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
31 * Migration entity. | |
32 * @param array $destination_id_values | |
33 * Values represent the destination ID. | |
34 */ | |
35 public function __construct(MigrationInterface $migration, $destination_id_values) { | |
36 $this->migration = $migration; | |
37 $this->destinationIdValues = $destination_id_values; | |
38 } | |
39 | |
40 /** | |
41 * Gets the migration entity. | |
42 * | |
43 * @return \Drupal\migrate\Plugin\MigrationInterface | |
44 * The migration being rolled back. | |
45 */ | |
46 public function getMigration() { | |
47 return $this->migration; | |
48 } | |
49 | |
50 /** | |
51 * Gets the destination ID values. | |
52 * | |
53 * @return array | |
54 * The destination ID as an array. | |
55 */ | |
56 public function getDestinationIdValues() { | |
57 return $this->destinationIdValues; | |
58 } | |
59 | |
60 } |