class MigrateIdMapMessageEvent in Drupal 9
Same name and namespace in other branches
- 8 core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php \Drupal\migrate\Event\MigrateIdMapMessageEvent
- 10 core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php \Drupal\migrate\Event\MigrateIdMapMessageEvent
Wraps an idmap message event for event listeners.
Hierarchy
- class \Drupal\Component\EventDispatcher\Event extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\migrate\Event\MigrateIdMapMessageEvent
Expanded class hierarchy of MigrateIdMapMessageEvent
4 files declare their use of MigrateIdMapMessageEvent
- MigrateEntityContentValidationTest.php in core/
modules/ migrate/ tests/ src/ Kernel/ MigrateEntityContentValidationTest.php - MigrateMessageTest.php in core/
modules/ migrate/ tests/ src/ Kernel/ MigrateMessageTest.php - MigrateUpgradeImportBatch.php in core/
modules/ migrate_drupal_ui/ src/ Batch/ MigrateUpgradeImportBatch.php - Sql.php in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php
File
- core/
modules/ migrate/ src/ Event/ MigrateIdMapMessageEvent.php, line 11
Namespace
Drupal\migrate\EventView source
class MigrateIdMapMessageEvent extends Event {
/**
* Migration entity.
*
* @var \Drupal\migrate\Plugin\MigrationInterface
*/
protected $migration;
/**
* Array of values uniquely identifying the source row.
*
* @var array
*/
protected $sourceIdValues;
/**
* Message to be logged.
*
* @var string
*/
protected $message;
/**
* Message severity.
*
* @var int
*/
protected $level;
/**
* Constructs a post-save event object.
*
* @param \Drupal\migrate\Plugin\MigrationInterface $migration
* Migration entity.
* @param array $source_id_values
* Values represent the source ID.
* @param string $message
* The message
* @param int $level
* Severity level (one of the MigrationInterface::MESSAGE_* constants).
*/
public function __construct(MigrationInterface $migration, array $source_id_values, $message, $level) {
$this->migration = $migration;
$this->sourceIdValues = $source_id_values;
$this->message = $message;
$this->level = $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 (one of the
* MigrationInterface::MESSAGE_* constants).
*
* @return int
* The message level.
*/
public function getLevel() {
return $this->level;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateIdMapMessageEvent:: |
protected | property | Message severity. | |
MigrateIdMapMessageEvent:: |
protected | property | Message to be logged. | |
MigrateIdMapMessageEvent:: |
protected | property | Migration entity. | |
MigrateIdMapMessageEvent:: |
protected | property | Array of values uniquely identifying the source row. | |
MigrateIdMapMessageEvent:: |
public | function | Gets the severity level of the message (one of the MigrationInterface::MESSAGE_* constants). | |
MigrateIdMapMessageEvent:: |
public | function | Gets the message to be logged. | |
MigrateIdMapMessageEvent:: |
public | function | Gets the migration entity. | |
MigrateIdMapMessageEvent:: |
public | function | Gets the source ID values. | |
MigrateIdMapMessageEvent:: |
public | function | Constructs a post-save event object. |