3 namespace Drupal\migrate\Event;
5 use Drupal\migrate\Plugin\MigrationInterface;
6 use Symfony\Component\EventDispatcher\Event;
9 * Wraps an idmap message event for event listeners.
11 class MigrateIdMapMessageEvent extends Event {
16 * @var \Drupal\migrate\Plugin\MigrationInterface
21 * Array of values uniquely identifying the source row.
25 protected $sourceIdValues;
28 * Message to be logged.
42 * Constructs a post-save event object.
44 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
46 * @param array $source_id_values
47 * Values represent the source ID.
48 * @param string $message
51 * Severity level (one of the MigrationInterface::MESSAGE_* constants).
53 public function __construct(MigrationInterface $migration, array $source_id_values, $message, $level) {
54 $this->migration = $migration;
55 $this->sourceIdValues = $source_id_values;
56 $this->message = $message;
57 $this->level = $level;
61 * Gets the migration entity.
63 * @return \Drupal\migrate\Plugin\MigrationInterface
64 * The migration entity involved.
66 public function getMigration() {
67 return $this->migration;
71 * Gets the source ID values.
74 * The source ID as an array.
76 public function getSourceIdValues() {
77 return $this->sourceIdValues;
81 * Gets the message to be logged.
86 public function getMessage() {
87 return $this->message;
91 * Gets the severity level of the message (one of the
92 * MigrationInterface::MESSAGE_* constants).
97 public function getLevel() {