class MigrateMapDeleteEvent
Same name in other branches
- 9 core/modules/migrate/src/Event/MigrateMapDeleteEvent.php \Drupal\migrate\Event\MigrateMapDeleteEvent
- 8.9.x core/modules/migrate/src/Event/MigrateMapDeleteEvent.php \Drupal\migrate\Event\MigrateMapDeleteEvent
- 10 core/modules/migrate/src/Event/MigrateMapDeleteEvent.php \Drupal\migrate\Event\MigrateMapDeleteEvent
Wraps a migrate map delete event for event listeners.
Hierarchy
- class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event
- class \Drupal\migrate\Event\MigrateMapDeleteEvent extends \Drupal\Component\EventDispatcher\Event
Expanded class hierarchy of MigrateMapDeleteEvent
3 files declare their use of MigrateMapDeleteEvent
- MigrateEventsTest.php in core/
modules/ migrate/ tests/ src/ Kernel/ MigrateEventsTest.php - MigrateUpgradeImportBatch.php in core/
modules/ migrate_drupal_ui/ src/ Batch/ MigrateUpgradeImportBatch.php - Sql.php in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php
File
-
core/
modules/ migrate/ src/ Event/ MigrateMapDeleteEvent.php, line 11
Namespace
Drupal\migrate\EventView source
class MigrateMapDeleteEvent extends Event {
/**
* Map plugin.
*
* @var \Drupal\migrate\Plugin\MigrateIdMapInterface
*/
protected $map;
/**
* Array of source ID fields.
*
* @var array
*/
protected $sourceId;
/**
* Constructs a migration map delete event object.
*
* @param \Drupal\migrate\Plugin\MigrateIdMapInterface $map
* Map plugin.
* @param array $source_id
* Array of source ID fields representing the object being deleted from the map.
*/
public function __construct(MigrateIdMapInterface $map, array $source_id) {
$this->map = $map;
$this->sourceId = $source_id;
}
/**
* 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 source ID of the item being removed from the map.
*
* @return array
* Array of source ID fields.
*/
public function getSourceId() {
return $this->sourceId;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MigrateMapDeleteEvent::$map | protected | property | Map plugin. |
MigrateMapDeleteEvent::$sourceId | protected | property | Array of source ID fields. |
MigrateMapDeleteEvent::getMap | public | function | Gets the map plugin. |
MigrateMapDeleteEvent::getSourceId | public | function | Gets the source ID of the item being removed from the map. |
MigrateMapDeleteEvent::__construct | public | function | Constructs a migration map delete event object. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.