function MessengerTrait::setMessenger
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Messenger/MessengerTrait.php \Drupal\Core\Messenger\MessengerTrait::setMessenger()
- 10 core/lib/Drupal/Core/Messenger/MessengerTrait.php \Drupal\Core\Messenger\MessengerTrait::setMessenger()
- 11.x core/lib/Drupal/Core/Messenger/MessengerTrait.php \Drupal\Core\Messenger\MessengerTrait::setMessenger()
Sets the messenger.
Parameters
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.
1 call to MessengerTrait::setMessenger()
- LayoutBuilderDisableForm::__construct in core/
modules/ layout_builder/ src/ Form/ LayoutBuilderDisableForm.php - Constructs a new RevertOverridesForm.
File
-
core/
lib/ Drupal/ Core/ Messenger/ MessengerTrait.php, line 23
Class
- MessengerTrait
- Provides a trait for the messenger service.
Namespace
Drupal\Core\MessengerCode
public function setMessenger(MessengerInterface $messenger) {
$this->messenger = $messenger;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.