interface AccessCheckInterface

An access check service determines access rules for particular routes.

Hierarchy

Expanded class hierarchy of AccessCheckInterface

All classes that implement AccessCheckInterface

2 files declare their use of AccessCheckInterface
CronAccessCheck.php in drupal/core/modules/system/lib/Drupal/system/Access/CronAccessCheck.php
Contains Drupal\system\Access\CronAccessCheck.
RegisterAccessCheck.php in drupal/core/modules/user/lib/Drupal/user/Access/RegisterAccessCheck.php
Contains Drupal\user\Access\RegisterAccessCheck.

File

drupal/core/lib/Drupal/Core/Access/AccessCheckInterface.php, line 16
Contains Drupal\Core\Access\AccessCheckInterface.

Namespace

Drupal\Core\Access
View source
interface AccessCheckInterface {

  /**
   * Declares whether the access check applies to a specific route or not.
   *
   * @param \Symfony\Component\Routing\Route $route
   *   The route to consider attaching to.
   *
   * @return bool
   *   TRUE if the check applies to the passed route, FALSE otherwise.
   */
  public function applies(Route $route);

  /**
   * Checks for access to route.
   *
   * @param \Symfony\Component\Routing\Route $route
   *   The route to check against.
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   The request object.
   *
   * @return mixed
   *   TRUE if access is allowed.
   *   FALSE if not.
   *   NULL if no opinion.
   */
  public function access(Route $route, Request $request);

}

Members

Namesort descending Modifiers Type Description Overrides
AccessCheckInterface::access public function Checks for access to route. 4
AccessCheckInterface::applies public function Declares whether the access check applies to a specific route or not. 4