class MigrateEvents

Same name in other branches
  1. 9 core/modules/migrate/src/Event/MigrateEvents.php \Drupal\migrate\Event\MigrateEvents
  2. 10 core/modules/migrate/src/Event/MigrateEvents.php \Drupal\migrate\Event\MigrateEvents
  3. 11.x core/modules/migrate/src/Event/MigrateEvents.php \Drupal\migrate\Event\MigrateEvents

Defines events for the migration system.

Hierarchy

Expanded class hierarchy of MigrateEvents

See also

\Drupal\migrate\Event\MigrateMapSaveEvent

\Drupal\migrate\Event\MigrateMapDeleteEvent

\Drupal\migrate\Event\MigrateImportEvent

\Drupal\migrate\Event\MigratePreRowSaveEvent

\Drupal\migrate\Event\MigratePostRowSaveEvent

\Drupal\migrate\Event\MigrateRollbackEvent

\Drupal\migrate\Event\MigrateRowDeleteEvent

\Drupal\migrate\Event\MigrateIdMapMessageEvent

9 files declare their use of MigrateEvents
MigrateEntityContentValidationTest.php in core/modules/migrate/tests/src/Kernel/MigrateEntityContentValidationTest.php
MigrateEventsTest.php in core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php
MigrateExecutable.php in core/modules/migrate/src/MigrateExecutable.php
MigrateInterruptionTest.php in core/modules/migrate/tests/src/Kernel/MigrateInterruptionTest.php
MigrateMessageTest.php in core/modules/migrate/tests/src/Kernel/MigrateMessageTest.php

... See full list

File

core/modules/migrate/src/Event/MigrateEvents.php, line 17

Namespace

Drupal\migrate\Event
View source
final class MigrateEvents {
    
    /**
     * Name of the event fired when saving to a migration's map.
     *
     * This event allows modules to perform an action whenever the disposition of
     * an item being migrated is saved to the map table. The event listener method
     * receives a \Drupal\migrate\Event\MigrateMapSaveEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateMapSaveEvent
     *
     * @var string
     */
    const MAP_SAVE = 'migrate.map_save';
    
    /**
     * Name of the event fired when removing an entry from a migration's map.
     *
     * This event allows modules to perform an action whenever a row is deleted
     * from a migration's map table (implying it has been rolled back). The event
     * listener method receives a \Drupal\migrate\Event\MigrateMapDeleteEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateMapDeleteEvent
     *
     * @var string
     */
    const MAP_DELETE = 'migrate.map_delete';
    
    /**
     * Name of the event fired when beginning a migration import operation.
     *
     * This event allows modules to perform an action whenever a migration import
     * operation is about to begin. The event listener method receives a
     * \Drupal\migrate\Event\MigrateImportEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateImportEvent
     *
     * @var string
     */
    const PRE_IMPORT = 'migrate.pre_import';
    
    /**
     * Name of the event fired when finishing a migration import operation.
     *
     * This event allows modules to perform an action whenever a migration import
     * operation is completing. The event listener method receives a
     * \Drupal\migrate\Event\MigrateImportEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateImportEvent
     *
     * @var string
     */
    const POST_IMPORT = 'migrate.post_import';
    
    /**
     * Name of the event fired when about to import a single item.
     *
     * This event allows modules to perform an action whenever a specific item
     * is about to be saved by the destination plugin. The event listener method
     * receives a \Drupal\migrate\Event\MigratePreRowSaveEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigratePreRowSaveEvent
     *
     * @var string
     */
    const PRE_ROW_SAVE = 'migrate.pre_row_save';
    
    /**
     * Name of the event fired just after a single item has been imported.
     *
     * This event allows modules to perform an action whenever a specific item
     * has been saved by the destination plugin. The event listener method
     * receives a \Drupal\migrate\Event\MigratePostRowSaveEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigratePostRowSaveEvent
     *
     * @var string
     */
    const POST_ROW_SAVE = 'migrate.post_row_save';
    
    /**
     * Name of the event fired when beginning a migration rollback operation.
     *
     * This event allows modules to perform an action whenever a migration
     * rollback operation is about to begin. The event listener method receives a
     * \Drupal\migrate\Event\MigrateRollbackEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateRollbackEvent
     *
     * @var string
     */
    const PRE_ROLLBACK = 'migrate.pre_rollback';
    
    /**
     * Name of the event fired when finishing a migration rollback operation.
     *
     * This event allows modules to perform an action whenever a migration
     * rollback operation is completing. The event listener method receives a
     * \Drupal\migrate\Event\MigrateRollbackEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateRollbackEvent
     *
     * @var string
     */
    const POST_ROLLBACK = 'migrate.post_rollback';
    
    /**
     * Name of the event fired when about to delete a single item.
     *
     * This event allows modules to perform an action whenever a specific item
     * is about to be deleted by the destination plugin. The event listener method
     * receives a \Drupal\migrate\Event\MigrateRowDeleteEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateRowDeleteEvent
     *
     * @var string
     */
    const PRE_ROW_DELETE = 'migrate.pre_row_delete';
    
    /**
     * Name of the event fired just after a single item has been deleted.
     *
     * This event allows modules to perform an action whenever a specific item
     * has been deleted by the destination plugin. The event listener method
     * receives a \Drupal\migrate\Event\MigrateRowDeleteEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateRowDeleteEvent
     *
     * @var string
     */
    const POST_ROW_DELETE = 'migrate.post_row_delete';
    
    /**
     * Name of the event fired when saving a message to the idmap.
     *
     * This event allows modules to perform an action whenever a message is being
     * logged by the idmap. The event listener method
     * receives a \Drupal\migrate\Event\MigrateIdMapMessageEvent instance.
     *
     * @Event
     *
     * @see \Drupal\migrate\Event\MigrateIdMapMessageEvent
     *
     * @var string
     */
    const IDMAP_MESSAGE = 'migrate.idmap_message';

}

Members

Title Sort descending Modifiers Object type Summary
MigrateEvents::IDMAP_MESSAGE constant Name of the event fired when saving a message to the idmap.
MigrateEvents::MAP_DELETE constant Name of the event fired when removing an entry from a migration's map.
MigrateEvents::MAP_SAVE constant Name of the event fired when saving to a migration's map.
MigrateEvents::POST_IMPORT constant Name of the event fired when finishing a migration import operation.
MigrateEvents::POST_ROLLBACK constant Name of the event fired when finishing a migration rollback operation.
MigrateEvents::POST_ROW_DELETE constant Name of the event fired just after a single item has been deleted.
MigrateEvents::POST_ROW_SAVE constant Name of the event fired just after a single item has been imported.
MigrateEvents::PRE_IMPORT constant Name of the event fired when beginning a migration import operation.
MigrateEvents::PRE_ROLLBACK constant Name of the event fired when beginning a migration rollback operation.
MigrateEvents::PRE_ROW_DELETE constant Name of the event fired when about to delete a single item.
MigrateEvents::PRE_ROW_SAVE constant Name of the event fired when about to import a single item.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.