function CommentNameConstraintValidator::create

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

Overrides ContainerInjectionInterface::create

File

core/modules/comment/src/Plugin/Validation/Constraint/CommentNameConstraintValidator.php, line 44

Class

CommentNameConstraintValidator
Validates the CommentName constraint.

Namespace

Drupal\comment\Plugin\Validation\Constraint

Code

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

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