class BasicRecursiveValidatorFactory

Same name in other branches
  1. 11.x core/lib/Drupal/Core/Validation/BasicRecursiveValidatorFactory.php \Drupal\Core\Validation\BasicRecursiveValidatorFactory

A factory for creating Symfony recursive validators.

Hierarchy

Expanded class hierarchy of BasicRecursiveValidatorFactory

3 files declare their use of BasicRecursiveValidatorFactory
FileUploadHandler.php in core/modules/file/src/Upload/FileUploadHandler.php
UploadedFileValidator.php in core/modules/file/src/Validation/UploadedFileValidator.php
UserNameValidator.php in core/modules/user/src/UserNameValidator.php
1 string reference to 'BasicRecursiveValidatorFactory'
core.services.yml in core/core.services.yml
core/core.services.yml
1 service uses BasicRecursiveValidatorFactory
validation.basic_recursive_validator_factory in core/core.services.yml
Drupal\Core\Validation\BasicRecursiveValidatorFactory

File

core/lib/Drupal/Core/Validation/BasicRecursiveValidatorFactory.php, line 14

Namespace

Drupal\Core\Validation
View source
class BasicRecursiveValidatorFactory {
    
    /**
     * Constructs a new RecursiveValidatorFactory.
     *
     * @param \Drupal\Core\DependencyInjection\ClassResolverInterface $classResolver
     *   The class resolver.
     */
    public function __construct(ClassResolverInterface $classResolver) {
    }
    
    /**
     * Creates a new RecursiveValidator.
     *
     * @return \Symfony\Component\Validator\Validator\RecursiveValidator
     *   The validator.
     */
    public function createValidator() : RecursiveValidator {
        return new RecursiveValidator(new ExecutionContextFactory(new DrupalTranslator()), new LazyLoadingMetadataFactory(), new ConstraintValidatorFactory($this->classResolver));
    }

}

Members

Title Sort descending Modifiers Object type Summary
BasicRecursiveValidatorFactory::createValidator public function Creates a new RecursiveValidator.
BasicRecursiveValidatorFactory::__construct public function Constructs a new RecursiveValidatorFactory.

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