function MessengerTrait::messenger
Gets the messenger.
Return value
\Drupal\Core\Messenger\MessengerInterface The messenger.
File
-
core/
lib/ Drupal/ Core/ Messenger/ MessengerTrait.php, line 33
Class
- MessengerTrait
- Provides a trait for the messenger service.
Namespace
Drupal\Core\MessengerCode
public function messenger() {
if (!isset($this->messenger)) {
$this->messenger = \Drupal::messenger();
}
return $this->messenger;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.