function PermissionChecker::__construct

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Session/PermissionChecker.php \Drupal\Core\Session\PermissionChecker::__construct()

File

core/lib/Drupal/Core/Session/PermissionChecker.php, line 12

Class

PermissionChecker
Checks permissions for an account.

Namespace

Drupal\Core\Session

Code

public function __construct(EntityTypeManagerInterface|AccessPolicyProcessorInterface $processor) {
    if ($this->processor instanceof EntityTypeManagerInterface) {
        @trigger_error('Calling ' . __METHOD__ . '() without the $processor argument is deprecated in drupal:10.3.0 and will be required in drupal:11.0.0. See https://www.drupal.org/node/3402107', E_USER_DEPRECATED);
        $this->processor = \Drupal::service('access_policy_processor');
    }
}

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