MigrateIdMapMessageEvent.php
Same filename and directory in other branches
Namespace
Drupal\migrate\EventFile
-
core/
modules/ migrate/ src/ Event/ MigrateIdMapMessageEvent.php
View source
<?php
namespace Drupal\migrate\Event;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\Component\EventDispatcher\Event;
/**
* Wraps an ID map message event for event listeners.
*/
class MigrateIdMapMessageEvent extends Event {
/**
* Constructs a post-save event object.
*
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
* Migration entity.
* @param array $sourceIdValues
* Values represent the source ID.
* @param string $message
* The message.
* @param int $level
* Severity level (one of the MigrationInterface::MESSAGE_* constants).
*/
public function __construct(protected MigrationInterface $migration, protected array $sourceIdValues, protected $message, protected $level) {
}
/**
* Gets the migration entity.
*
* @return \Drupal\migrate\Plugin\MigrationInterface
* The migration entity involved.
*/
public function getMigration() {
return $this->migration;
}
/**
* Gets the source ID values.
*
* @return array
* The source ID as an array.
*/
public function getSourceIdValues() {
return $this->sourceIdValues;
}
/**
* Gets the message to be logged.
*
* @return string
* The message text.
*/
public function getMessage() {
return $this->message;
}
/**
* Gets the severity level of the message.
*
* Message levels are declared in MigrationInterface and start with MESSAGE_.
*
* @see \Drupal\migrate\Plugin\MigrationInterface
*
* @return int
* The message level.
*/
public function getLevel() {
return $this->level;
}
}
Classes
| Title | Deprecated | Summary |
|---|---|---|
| MigrateIdMapMessageEvent | Wraps an ID map message event for event listeners. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.