You are here

class MigrateRollbackEvent in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Event/MigrateRollbackEvent.php \Drupal\migrate\Event\MigrateRollbackEvent

Wraps a pre- or post-rollback event for event listeners.

Hierarchy

Expanded class hierarchy of MigrateRollbackEvent

3 files declare their use of MigrateRollbackEvent
MigrateExecutable.php in core/modules/migrate/src/MigrateExecutable.php
PluginEventSubscriber.php in core/modules/migrate/src/Plugin/PluginEventSubscriber.php
SourcePluginBase.php in core/modules/migrate/src/Plugin/migrate/source/SourcePluginBase.php

File

core/modules/migrate/src/Event/MigrateRollbackEvent.php, line 11

Namespace

Drupal\migrate\Event
View source
class MigrateRollbackEvent extends Event {

  /**
   * Migration entity.
   *
   * @var \Drupal\migrate\Plugin\MigrationInterface
   */
  protected $migration;

  /**
   * Constructs an rollback event object.
   *
   * @param \Drupal\migrate\Plugin\MigrationInterface $migration
   *   Migration entity.
   */
  public function __construct(MigrationInterface $migration) {
    $this->migration = $migration;
  }

  /**
   * Gets the migration entity.
   *
   * @return \Drupal\migrate\Plugin\MigrationInterface
   *   The migration entity involved.
   */
  public function getMigration() {
    return $this->migration;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
MigrateRollbackEvent::$migration protected property Migration entity.
MigrateRollbackEvent::getMigration public function Gets the migration entity.
MigrateRollbackEvent::__construct public function Constructs an rollback event object.