class TestMessenger in Views XML Backend 8
The messenger used for tests.
Hierarchy
- class \Drupal\views_xml_backend\TestMessenger implements MessengerInterface
Expanded class hierarchy of TestMessenger
1 file declares its use of TestMessenger
- XmlTest.php in tests/
src/ Unit/ Plugin/ views/ query/ XmlTest.php - Contains \Drupal\Tests\views_xml_backend\Unit\Plugin\views\query\XmlTest.
File
- src/
TestMessenger.php, line 13 - Contains \Drupal\views_xml_backend\TestMessenger.
Namespace
Drupal\views_xml_backendView source
class TestMessenger implements MessengerInterface {
/**
* A list of messages received.
*
* @var array
*/
protected $messages = [];
/**
* {@inheritdoc}
*/
public function setMessage($message = NULL, $type = 'status', $repeat = FALSE) {
$this->messages[$type][] = (string) $message;
}
/**
* Returns the messages that were sent keyed by message type.
*
* @return array
* The list of messages.
*/
public function getMessages() {
return $this->messages;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TestMessenger:: |
protected | property | A list of messages received. | |
TestMessenger:: |
public | function | Returns the messages that were sent keyed by message type. | |
TestMessenger:: |
public | function |
Sets a message to display to the user. Overrides MessengerInterface:: |