You are here

public function KernelEventListener::onKernelRequest in Permissions by Term 8.2

Same name and namespace in other branches
  1. 8 src/Listener/KernelEventListener.php \Drupal\permissions_by_term\Listener\KernelEventListener::onKernelRequest()

Access restriction on kernel request.

File

src/Listener/KernelEventListener.php, line 80

Class

KernelEventListener
Class KernelEventListener.

Namespace

Drupal\permissions_by_term\Listener

Code

public function onKernelRequest(GetResponseEvent $event) {
  if ($event
    ->isMasterRequest()) {
    if (($result = $this
      ->handleAccessToNodePages($event)) instanceof Response) {
      $event
        ->setResponse($result);
    }
    if (($result = $this
      ->handleAccessToTermAutocompleteLists($event)) instanceof Response) {
      $event
        ->setResponse($result);
    }
    if (($result = $this
      ->handleAccessToTaxonomyTermViewsPages()) instanceof Response) {
      $event
        ->setResponse($result);
    }
  }
}