public function EntityAccessCheck::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/lib/Drupal/Core/Entity/EntityAccessCheck.php, line 23
Contains \Drupal\Core\Entity\EntityAccessCheck.

Class

EntityAccessCheck
Provides a generic access checker for entities.

Namespace

Drupal\Core\Entity

Code

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