class MigrateIdMapMessageEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Event/MigrateIdMapMessageEvent.php \Drupal\migrate\Event\MigrateIdMapMessageEvent
Wraps an idmap message event for event listeners.
Hierarchy
- class \Symfony\Component\EventDispatcher\Event
- class \Drupal\migrate\Event\MigrateIdMapMessageEvent
Expanded class hierarchy of MigrateIdMapMessageEvent
2 files declare their use of MigrateIdMapMessageEvent
- MigrateMessageTest.php in core/
modules/ migrate/ src/ Tests/ MigrateMessageTest.php - Contains \Drupal\migrate\Tests\MigrateMessageTest.
- Sql.php in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Contains \Drupal\migrate\Plugin\migrate\id_map\Sql.
File
- core/
modules/ migrate/ src/ Event/ MigrateIdMapMessageEvent.php, line 16 - Contains \Drupal\migrate\Event\MigrateIdMapMessageEvent.
Namespace
Drupal\migrate\EventView source
class MigrateIdMapMessageEvent extends Event {
/**
* Migration entity.
*
* @var \Drupal\migrate\Entity\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\Entity\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\Entity\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 |
---|---|---|---|---|
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
public | function | Returns the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Gets the event's name. | |
Event:: |
public | function | Returns whether further event listeners should be triggered. | |
Event:: |
public | function | Stores the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Sets the event's name property. | |
Event:: |
public | function | Stops the propagation of the event to further event listeners. | |
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. |