function AllowedValuesConstraintValidator::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php \Drupal\Core\Validation\Plugin\Validation\Constraint\AllowedValuesConstraintValidator::__construct()
  2. 8.9.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php \Drupal\Core\Validation\Plugin\Validation\Constraint\AllowedValuesConstraintValidator::__construct()
  3. 11.x core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php \Drupal\Core\Validation\Plugin\Validation\Constraint\AllowedValuesConstraintValidator::__construct()

Constructs a new AllowedValuesConstraintValidator.

Parameters

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

File

core/lib/Drupal/Core/Validation/Plugin/Validation/Constraint/AllowedValuesConstraintValidator.php, line 43

Class

AllowedValuesConstraintValidator
Validates the AllowedValues constraint.

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

Code

public function __construct(AccountInterface $current_user) {
    $this->currentUser = $current_user;
}

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