public function LinkDeleteAccessCheck::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/shortcut/lib/Drupal/shortcut/Access/LinkDeleteAccessCheck.php, line 22
Contains Drupal\shortcut\Access\LinkDeleteAccessCheck.

Class

LinkDeleteAccessCheck
Provides an access check for shortcut link delete routes.

Namespace

Drupal\shortcut\Access

Code

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