interface MessengerInterface in Service Container 7.2
Same name and namespace in other branches
- 8 src/Messenger/MessengerInterface.php \Drupal\service_container\Messenger\MessengerInterface
- 7 src/Messenger/MessengerInterface.php \Drupal\service_container\Messenger\MessengerInterface
Hierarchy
- interface \Drupal\service_container\Messenger\MessengerInterface
Expanded class hierarchy of MessengerInterface
All classes that implement MessengerInterface
4 files declare their use of MessengerInterface
- Plugin4A.php in modules/
providers/ service_container_annotation_discovery/ tests/ modules/ service_container_annotation_discovery_test/ src/ Plugin/ Plugin4/ Plugin4A/ Plugin4A.php - Plugin5A.php in modules/
providers/ service_container_annotation_discovery/ tests/ modules/ service_container_annotation_discovery_test/ src/ Plugin/ Plugin5/ Plugin5A/ Plugin5A.php - Plugin8A.php in modules/
providers/ service_container_annotation_discovery/ tests/ modules/ service_container_annotation_discovery_subtest/ src/ Plugin/ Plugin8/ Plugin8A/ Plugin8A.php - ServiceContainerAnnotationDiscoveryIntegrationTest.php in modules/
providers/ service_container_annotation_discovery/ lib/ Drupal/ service_container_annotation_discovery/ Tests/ ServiceContainerAnnotationDiscoveryIntegrationTest.php - Contains \Drupal\service_container_annotation_discovery\Tests\ServiceContainerBlockIntegrationTest.
File
- src/
Messenger/ MessengerInterface.php, line 10 - Contains \Drupal\Core\Messenger\MessengerInterface.
Namespace
Drupal\service_container\MessengerView source
interface MessengerInterface {
/**
* A status message.
*/
const STATUS = 'status';
/**
* A warning.
*/
const WARNING = 'warning';
/**
* An error.
*/
const ERROR = 'error';
/**
* Adds a new message to the queue.
*
* @param string $message
* (optional) The translated message to be displayed to the user. For
* consistency with other messages, it should begin with a capital letter
* and end with a period.
* @param string $type
* (optional) The message's type. Either self::STATUS, self::WARNING, or
* self::ERROR.
* @param bool $repeat
* (optional) If this is FALSE and the message is already set, then the
* message won't be repeated. Defaults to FALSE.
*
* @return $this
*/
public function addMessage($message, $type = self::STATUS, $repeat = FALSE);
/**
* Gets all messages.
*
* @return array[]
* Keys are message types and values are indexed arrays of messages. Message
* types are either self::STATUS, self::WARNING, or self::ERROR.
*/
public function getMessages();
/**
* Gets all messages of a certain type.
*
* @param string $type
* The messages' type. Either self::STATUS, self::WARNING, or self::ERROR.
*
* @return string[]
*/
public function getMessagesByType($type);
/**
* Deletes all messages.
*
* @return $this
*/
public function deleteMessages();
/**
* Deletes all messages of a certain type.
*
* @param string $type
* The messages' type. Either self::STATUS, self::WARNING, or self::ERROR.
*
* @return $this
*/
public function deleteMessagesByType($type);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MessengerInterface:: |
public | function | Adds a new message to the queue. | 1 |
MessengerInterface:: |
public | function | Deletes all messages. | 1 |
MessengerInterface:: |
public | function | Deletes all messages of a certain type. | 1 |
MessengerInterface:: |
constant | An error. | ||
MessengerInterface:: |
public | function | Gets all messages. | 1 |
MessengerInterface:: |
public | function | Gets all messages of a certain type. | 1 |
MessengerInterface:: |
constant | A status message. | ||
MessengerInterface:: |
constant | A warning. |