You are here

public function ProtectedUserFieldConstraintValidator::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator::__construct()

Constructs the object.

Parameters

\Drupal\user\UserStorageInterface $user_storage: The user storage handler.

\Drupal\Core\Session\AccountProxyInterface $current_user: The current user.

File

core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php, line 39

Class

ProtectedUserFieldConstraintValidator
Validates the ProtectedUserFieldConstraint constraint.

Namespace

Drupal\user\Plugin\Validation\Constraint

Code

public function __construct(UserStorageInterface $user_storage, AccountProxyInterface $current_user) {
  $this->userStorage = $user_storage;
  $this->currentUser = $current_user;
}