You are here

class MigrateRollbackEvent in Drupal 10

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

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

Hierarchy

  • class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event

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 a 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 a rollback event object.