New answers tagged


In case someone needs a different approach to the accepted answer above. I use this to remove status messages when the site is in maintenance mode. $maintenance_mode = \Drupal::state()->get('system.maintenance_mode'); if (!empty($maintenance_mode)) { //use can do other stuff here, but in my case I want to remove status message \Drupal::messenger()-&...

Top 50 recent answers are included