ExecutionContext::isObjectInitialized()

bool isObjectInitialized(string $cacheKey) Returns whether an object was initialized. Parameters string $cacheKey The hash of the object Return Value bool Whether the object was already initialized

ExecutionContext::markObjectAsInitialized()

markObjectAsInitialized(string $cacheKey) Marks that an object was initialized. Parameters string $cacheKey The hash of the object

ExecutionContext::markGroupAsValidated()

markGroupAsValidated(string $cacheKey, string $groupHash) Marks an object as validated in a specific validation group. Parameters string $cacheKey The hash of the object string $groupHash The group's name or hash, if it is group sequence

ExecutionContext::setGroup()

setGroup(string|null $group) Sets the currently validated group. Parameters string|null $group The validated group

ExecutionContext::markConstraintAsValidated()

markConstraintAsValidated(string $cacheKey, string $constraintHash) Marks a constraint as validated for an object. Parameters string $cacheKey The hash of the object string $constraintHash The hash of the constraint

ExecutionContext::getValue()

mixed getValue() Returns the value that the validator is currently validating. If you want to retrieve the object that was originally passed to the validator, use {@link getRoot}. Return Value mixed The currently validated value

ExecutionContext::getValidator()

ValidatorInterface getValidator() Returns the validator. Useful if you want to validate additional constraints: public function validate($value, Constraint $constraint) { $validator = $this->context->getValidator(); $violations = $validator->validateValue($value, new Length(array('min' => 3))); if (count($violations) > 0) { // ... } } Return Value ValidatorInterface

ExecutionContext::isGroupValidated()

bool isGroupValidated(string $cacheKey, string $groupHash) Returns whether an object was validated in a specific validation group. Parameters string $cacheKey The hash of the object string $groupHash The group's name or hash, if it is group sequence Return Value bool Whether the object was already validated for that group

ExecutionContext::getViolations()

ConstraintViolationListInterface getViolations() Returns the violations generated by the validator so far. Return Value ConstraintViolationListInterface The constraint violation list

ExecutionContext::isConstraintValidated()

bool isConstraintValidated(string $cacheKey, string $constraintHash) Returns whether a constraint was validated for an object. Parameters string $cacheKey The hash of the object string $constraintHash The hash of the constraint Return Value bool Whether the constraint was already validated