comparison core/modules/migrate/src/Event/MigrateRollbackEvent.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 pre- or post-rollback event for event listeners.
10 */
11 class MigrateRollbackEvent extends Event {
12
13 /**
14 * Migration entity.
15 *
16 * @var \Drupal\migrate\Plugin\MigrationInterface
17 */
18 protected $migration;
19
20 /**
21 * Constructs an rollback event object.
22 *
23 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
24 * Migration entity.
25 */
26 public function __construct(MigrationInterface $migration) {
27 $this->migration = $migration;
28 }
29
30 /**
31 * Gets the migration entity.
32 *
33 * @return \Drupal\migrate\Plugin\MigrationInterface
34 * The migration entity involved.
35 */
36 public function getMigration() {
37 return $this->migration;
38 }
39
40 }