Compare commits
No commits in common. "2.x" and "1.x" have entirely different histories.
|
@ -1,8 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "drupal/simple_message",
|
"name": "drupal/simple_message",
|
||||||
"description": "Displays a simple message.",
|
"description": "Displays a simple message.",
|
||||||
"type": "drupal-module",
|
"type": "drupal-module"
|
||||||
"require": {
|
|
||||||
"php": "^7.4"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace Drupal\simple_message;
|
namespace Drupal\simple_message;
|
||||||
|
|
||||||
use Drupal\Core\Config\Config;
|
|
||||||
use Drupal\Core\Routing\AdminContext;
|
use Drupal\Core\Routing\AdminContext;
|
||||||
use Drupal\Core\Messenger\MessengerInterface;
|
use Drupal\Core\Messenger\MessengerInterface;
|
||||||
use Drupal\Core\Config\ConfigFactoryInterface;
|
use Drupal\Core\Config\ConfigFactoryInterface;
|
||||||
|
@ -17,9 +14,9 @@ final class DisplaySimpleMessage implements EventSubscriberInterface {
|
||||||
|
|
||||||
use StringTranslationTrait;
|
use StringTranslationTrait;
|
||||||
|
|
||||||
private MessengerInterface $messenger;
|
private $messenger;
|
||||||
private AdminContext $adminContext;
|
private $adminContext;
|
||||||
private Config $config;
|
private $config;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
MessengerInterface $messenger,
|
MessengerInterface $messenger,
|
||||||
|
@ -31,7 +28,7 @@ final class DisplaySimpleMessage implements EventSubscriberInterface {
|
||||||
$this->config = $configFactory->get('simple_message.config');
|
$this->config = $configFactory->get('simple_message.config');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function displayMessage(GetResponseEvent $event): void {
|
public function displayMessage(GetResponseEvent $event) {
|
||||||
if ($this->adminContext->isAdminRoute()) {
|
if ($this->adminContext->isAdminRoute()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue