Return early for admin routes

This commit is contained in:
Oliver Davies 2020-09-02 09:41:59 +01:00
parent 08d28544e0
commit 26a4ca66ef

View file

@ -24,6 +24,10 @@ class DisplaySimpleMessage implements EventSubscriberInterface {
}
public function displayMessage(GetResponseEvent $event) {
if (\Drupal::service('router.admin_context')->isAdminRoute()) {
return;
}
$this->messenger->addMessage($this->t('This site is running on a <a href="@vagrant">Vagrant</a> server, deployed with <a href="@ansible">Ansible</a> and <a href="@ansistrano">Ansistrano</a>.', [
'@ansible' => 'https://ansible.com',
'@ansistrano' => 'https://ansistrano.com',