function AllowedValuesConstraintValidator::create

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

Overrides ContainerInjectionInterface::create

File

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

Class

AllowedValuesConstraintValidator
Validates the AllowedValues constraint.

Namespace

Drupal\Core\Validation\Plugin\Validation\Constraint

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('current_user'));
}

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