AccessAwareRouter::matchRequest

public AccessAwareRouter::matchRequest(Request $request)

Throws

\Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException Thrown when access checking failed.

Overrides AccessAwareRouterInterface::matchRequest

File

core/lib/Drupal/Core/Routing/AccessAwareRouter.php, line 84

Class

AccessAwareRouter
A router class for Drupal with access check and upcasting.

Namespace

Drupal\Core\Routing

Code

public function matchRequest(Request $request) {
  $parameters = $this->chainRouter->matchRequest($request);
  $request->attributes->add($parameters);
  $this->checkAccess($request);
  // We can not return $parameters because the access check can change the
  // request attributes.
  return $request->attributes->all();
}
doc_Drupal
2016-10-29 08:42:21
Comments
Leave a Comment

Please login to continue.