RecursiveValidator::inContext

public RecursiveValidator::inContext(ExecutionContextInterface $context)

Returns a validator in the given execution context.

The returned validator adds all generated violations to the given context.

Parameters

ExecutionContextInterface $context The execution context:

Return value

ContextualValidatorInterface The validator for that context

Overrides ValidatorInterface::inContext

File

core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php, line 61

Class

RecursiveValidator
Defines a recursive validator for Typed Data.

Namespace

Drupal\Core\TypedData\Validation

Code

public function inContext(ExecutionContextInterface $context) {
  return new RecursiveContextualValidator($context, $this, $this->constraintValidatorFactory, $this->typedDataManager);
}
doc_Drupal
2016-10-29 09:36:49
Comments
Leave a Comment

Please login to continue.