Last active
July 29, 2021 12:42
-
-
Save henideepak/55b791914edb8c6d824d0b8d8ba8c4a6 to your computer and use it in GitHub Desktop.
Drupal Message Service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\Drupal::messenger()->addStatus('Cache rebuild complete.'); | |
\Drupal::messenger()->addWarning(t('The reference view %view_name cannot be found.', ['%view_name' => $view_name])); | |
\Drupal::messenger()->addError(t('The user account %id does not exist.', ['%id' => $uid])); | |
\Drupal::messenger()->addMessage($message, 'status'); | |
\Drupal::messenger()->addMessage($message, 'warning'); | |
\Drupal::messenger()->addMessage($message, 'error'); | |
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Messenger%21MessengerInterface.php/function/MessengerInterface%3A%3AaddMessage/9.2.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment