function CheckProviderInterface::addCheckService
Same name in other branches
- 9 core/lib/Drupal/Core/Access/CheckProviderInterface.php \Drupal\Core\Access\CheckProviderInterface::addCheckService()
- 8.9.x core/lib/Drupal/Core/Access/CheckProviderInterface.php \Drupal\Core\Access\CheckProviderInterface::addCheckService()
- 10 core/lib/Drupal/Core/Access/CheckProviderInterface.php \Drupal\Core\Access\CheckProviderInterface::addCheckService()
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.
1 method overrides CheckProviderInterface::addCheckService()
- CheckProvider::addCheckService in core/
lib/ Drupal/ Core/ Access/ CheckProvider.php - Registers a new AccessCheck by service ID.
File
-
core/
lib/ Drupal/ Core/ Access/ CheckProviderInterface.php, line 39
Class
- CheckProviderInterface
- Provides the available access checkers by service IDs.
Namespace
Drupal\Core\AccessCode
public function addCheckService($service_id, $service_method, array $applies_checks = [], $needs_incoming_request = FALSE);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.