You are here

public function LayoutController::checkAccess in Layout 8.2

Checks access for the layout template.

1 string reference to 'LayoutController::checkAccess'
layout.routing.yml in ./layout.routing.yml
layout.routing.yml

File

lib/Drupal/layout/Controller/LayoutController.php, line 114
Contains \Drupal\layout\Controller\LayoutController.

Class

LayoutController
Controller routines for layout routes.

Namespace

Drupal\layout\Controller

Code

public function checkAccess(Request $request) {
  return $this->layoutManager
    ->getDefinition($request->attributes
    ->get('key')) ? AccessInterface::ALLOW : AccessInterface::DENY;
}