You are here

class MigrateMapSaveEvent in Zircon Profile 8.0

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

Wraps a migrate map save event for event listeners.

Hierarchy

Expanded class hierarchy of MigrateMapSaveEvent

2 files declare their use of MigrateMapSaveEvent
MigrateEventsTest.php in core/modules/migrate/src/Tests/MigrateEventsTest.php
Contains \Drupal\migrate\Tests\MigrateEventsTest.
Sql.php in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Contains \Drupal\migrate\Plugin\migrate\id_map\Sql.

File

core/modules/migrate/src/Event/MigrateMapSaveEvent.php, line 16
Contains \Drupal\migrate\Event\MigrateMapSaveEvent.

Namespace

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

  /**
   * Map plugin.
   *
   * @var \Drupal\migrate\Plugin\MigrateIdMapInterface
   */
  protected $map;

  /**
   * Array of fields being saved to the map, keyed by field name.
   *
   * @var array
   */
  protected $fields;

  /**
   * Constructs a migration map event object.
   *
   * @param \Drupal\migrate\Plugin\MigrateIdMapInterface $map
   *   Map plugin.
   * @param array $fields
   *   Array of fields being saved to the map.
   */
  public function __construct(MigrateIdMapInterface $map, array $fields) {
    $this->map = $map;
    $this->fields = $fields;
  }

  /**
   * Gets the map plugin.
   *
   * @return \Drupal\migrate\Plugin\MigrateIdMapInterface
   *   The map plugin that caused the event to fire.
   */
  public function getMap() {
    return $this->map;
  }

  /**
   * Gets the fields about to be saved to the map.
   *
   * @return array
   *   Array of map fields, keyed by field name.
   */
  public function getFields() {
    return $this->fields;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Event::$dispatcher private property
Event::$name private property
Event::$propagationStopped private property
Event::getDispatcher Deprecated public function Returns the EventDispatcher that dispatches this Event.
Event::getName Deprecated public function Gets the event's name.
Event::isPropagationStopped public function Returns whether further event listeners should be triggered.
Event::setDispatcher Deprecated public function Stores the EventDispatcher that dispatches this Event.
Event::setName Deprecated public function Sets the event's name property.
Event::stopPropagation public function Stops the propagation of the event to further event listeners.
MigrateMapSaveEvent::$fields protected property Array of fields being saved to the map, keyed by field name.
MigrateMapSaveEvent::$map protected property Map plugin.
MigrateMapSaveEvent::getFields public function Gets the fields about to be saved to the map.
MigrateMapSaveEvent::getMap public function Gets the map plugin.
MigrateMapSaveEvent::__construct public function Constructs a migration map event object.