class MigratePostRowSaveEvent

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

Wraps a post-save event for event listeners.

Hierarchy

  • class \Drupal\migrate\Event\EventBase extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of MigratePostRowSaveEvent

6 files declare their use of MigratePostRowSaveEvent
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
MigratePostRowSaveEventTest.php in core/modules/migrate/tests/src/Unit/Event/MigratePostRowSaveEventTest.php
MigrateUpgradeImportBatch.php in core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php

... See full list

File

core/modules/migrate/src/Event/MigratePostRowSaveEvent.php, line 12

Namespace

Drupal\migrate\Event
View source
class MigratePostRowSaveEvent extends MigratePreRowSaveEvent {
    
    /**
     * The row's destination ID.
     *
     * @var array|bool
     */
    protected $destinationIdValues = [];
    
    /**
     * Constructs a post-save event object.
     *
     * @param \Drupal\migrate\Plugin\MigrationInterface $migration
     *   Migration entity.
     * @param \Drupal\migrate\MigrateMessageInterface $message
     *   The message interface.
     * @param \Drupal\migrate\Row $row
     *   Row object.
     * @param array|bool $destination_id_values
     *   Values represent the destination ID.
     */
    public function __construct(MigrationInterface $migration, MigrateMessageInterface $message, Row $row, $destination_id_values) {
        parent::__construct($migration, $message, $row);
        $this->destinationIdValues = $destination_id_values;
    }
    
    /**
     * Gets the destination ID values.
     *
     * @return array
     *   The destination ID as an array.
     */
    public function getDestinationIdValues() {
        return $this->destinationIdValues;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
EventBase::$message protected property The current message service.
EventBase::$migration protected property The migration.
EventBase::getMigration public function Gets the migration.
EventBase::logMessage public function Logs a message using the Migrate message service.
MigratePostRowSaveEvent::$destinationIdValues protected property The row's destination ID.
MigratePostRowSaveEvent::getDestinationIdValues public function Gets the destination ID values.
MigratePostRowSaveEvent::__construct public function Constructs a post-save event object. Overrides MigratePreRowSaveEvent::__construct
MigratePreRowSaveEvent::$row protected property Row object.
MigratePreRowSaveEvent::getRow public function Gets the row object.

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