class MigrateMessageCapture in GatherContent 8.5
Allows capturing messages rather than displaying them directly.
Hierarchy
- class \Drupal\gathercontent\MigrateMessageCapture implements MigrateMessageInterface
Expanded class hierarchy of MigrateMessageCapture
1 file declares its use of MigrateMessageCapture
- gathercontent.module in ./
gathercontent.module - Main module file for GatherContent module.
File
- src/
MigrateMessageCapture.php, line 10
Namespace
Drupal\gathercontentView source
class MigrateMessageCapture implements MigrateMessageInterface {
/**
* Array of recorded messages.
*
* @var array
*/
protected $messages = [];
/**
* {@inheritdoc}
*/
public function display($message, $type = 'status') {
$this->messages[] = $message;
}
/**
* Clears out any captured messages.
*/
public function clear() {
$this->messages = [];
}
/**
* Returns any captured messages.
*
* @return array
* The captured messages.
*/
public function getMessages() {
return $this->messages;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateMessageCapture:: |
protected | property | Array of recorded messages. | |
MigrateMessageCapture:: |
public | function | Clears out any captured messages. | |
MigrateMessageCapture:: |
public | function |
Displays a migrate message. Overrides MigrateMessageInterface:: |
|
MigrateMessageCapture:: |
public | function | Returns any captured messages. |