public function ViewModeAccessCheck::applies

Declares whether the access check applies to a specific route or not.

Parameters

\Symfony\Component\Routing\Route $route: The route to consider attaching to.

Return value

bool TRUE if the check applies to the passed route, FALSE otherwise.

Overrides AccessCheckInterface::applies

File

drupal/core/modules/field_ui/lib/Drupal/field_ui/Access/ViewModeAccessCheck.php, line 22
Contains \Drupal\field_ui\Access\ViewModeAccessCheck.

Class

ViewModeAccessCheck
Allows access to routes to be controlled by an '_access' boolean parameter.

Namespace

Drupal\field_ui\Access

Code

public function applies(Route $route) {
  return array_key_exists('_field_ui_view_mode_access', $route
    ->getRequirements());
}