You are here

function taxonomy_access_fix_route_access in Taxonomy access fix 8

Route access callback

File

./taxonomy_access_fix.module, line 84

Code

function taxonomy_access_fix_route_access(Route $route, RouteMatchInterface $match) {
  $op = $route
    ->getOption('op');
  $vocabulary = $match
    ->getParameter('taxonomy_vocabulary');
  if (taxonomy_access_fix_access($op, $vocabulary)) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}