Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. MigratePostRowSaveEvent.php

class MigratePostRowSaveEvent

Wraps a post-save event for event listeners.

Hierarchy

  • class \Symfony\Contracts\EventDispatcher\Event implements \Psr\EventDispatcher\StoppableEventInterface
    • class \Drupal\Component\EventDispatcher\Event extends \Symfony\Contracts\EventDispatcher\Event
      • class \Drupal\migrate\Event\EventBase extends \Drupal\Component\EventDispatcher\Event
        • class \Drupal\migrate\Event\MigratePreRowSaveEvent extends \Drupal\migrate\Event\EventBase
          • class \Drupal\migrate\Event\MigratePostRowSaveEvent extends \Drupal\migrate\Event\MigratePreRowSaveEvent

Expanded class hierarchy of MigratePostRowSaveEvent

3 files declare their use of MigratePostRowSaveEvent
MigrateExecutable.php in core/modules/migrate/src/MigrateExecutable.php
MigrateUpgradeImportBatch.php in core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php
NodeTranslationMigrateSubscriber.php in core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php

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.

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal