public function CheckProviderInterface::addCheckService

public CheckProviderInterface::addCheckService($service_id, $service_method, array $applies_checks = array(), $needs_incoming_request = FALSE)

Registers a new AccessCheck by service ID.

Parameters

string $service_id: The ID of the service in the Container that provides a check.

string $service_method: The method to invoke on the service object for performing the check.

array $applies_checks: (optional) An array of route requirement keys the checker service applies to.

bool $needs_incoming_request: (optional) True if access-check method only acts on an incoming request.

File

core/lib/Drupal/Core/Access/CheckProviderInterface.php, line 40

Class

CheckProviderInterface
Provides the available access checkers by service IDs.

Namespace

Drupal\Core\Access

Code

public function addCheckService($service_id, $service_method, array $applies_checks = array(), $needs_incoming_request = FALSE);

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Access!CheckProviderInterface.php/function/CheckProviderInterface::addCheckService/8.1.x