function CheckProviderInterface::loadCheck

Same name in other branches
  1. 9 core/lib/Drupal/Core/Access/CheckProviderInterface.php \Drupal\Core\Access\CheckProviderInterface::loadCheck()
  2. 10 core/lib/Drupal/Core/Access/CheckProviderInterface.php \Drupal\Core\Access\CheckProviderInterface::loadCheck()
  3. 11.x core/lib/Drupal/Core/Access/CheckProviderInterface.php \Drupal\Core\Access\CheckProviderInterface::loadCheck()

Lazy-loads access check services.

Parameters

string $service_id: The service id of the access check service to load.

Return value

callable A callable access check.

Throws

\InvalidArgumentException Thrown when the service hasn't been registered in addCheckService().

\Drupal\Core\Access\AccessException Thrown when the service doesn't implement the required interface.

1 method overrides CheckProviderInterface::loadCheck()
CheckProvider::loadCheck in core/lib/Drupal/Core/Access/CheckProvider.php
Lazy-loads access check services.

File

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

Class

CheckProviderInterface
Provides the available access checkers by service IDs.

Namespace

Drupal\Core\Access

Code

public function loadCheck($service_id);

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.