You are here

public function MessengerTrait::setMessenger in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Messenger/MessengerTrait.php \Drupal\Core\Messenger\MessengerTrait::setMessenger()
  2. 9 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\Messenger

Code

public function setMessenger(MessengerInterface $messenger) {
  $this->messenger = $messenger;
}