You are here

public function EntityLegalSubscriber::checkRedirect in Entity Legal 3.0.x

Same name and namespace in other branches
  1. 8.2 src/EventSubscriber/EntityLegalSubscriber.php \Drupal\entity_legal\EventSubscriber\EntityLegalSubscriber::checkRedirect()
  2. 4.0.x src/EventSubscriber/EntityLegalSubscriber.php \Drupal\entity_legal\EventSubscriber\EntityLegalSubscriber::checkRedirect()

Request event callback.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The request event.

File

src/EventSubscriber/EntityLegalSubscriber.php, line 22

Class

EntityLegalSubscriber
Class EntityLegalSubscriber.

Namespace

Drupal\entity_legal\EventSubscriber

Code

public function checkRedirect(GetResponseEvent $event) {
  $context = [
    'event' => $event,
  ];

  // Execute Redirect method plugin.
  \Drupal::service('plugin.manager.entity_legal')
    ->createInstance('redirect')
    ->execute($context);
}