public function MessengerTrait::setMessenger in Drupal 9
Same name and namespace in other branches
- 8 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()
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;
}