function ProtectedUserFieldConstraintValidator::create

Same name in other branches
  1. 8.9.x core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator::create()
  2. 10 core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator::create()
  3. 11.x core/modules/user/src/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidator.php \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator::create()

Overrides ContainerInjectionInterface::create

File

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

Class

ProtectedUserFieldConstraintValidator
Validates the ProtectedUserFieldConstraint constraint.

Namespace

Drupal\user\Plugin\Validation\Constraint

Code

public static function create(ContainerInterface $container) {
    return new static($container->get('entity_type.manager')
        ->getStorage('user'), $container->get('current_user'));
}

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