protected function initTimeIsOptional(ComponentsValidator $validator) { if (!isset($this->timeIsOptionalComponentName)) { $this->timeIsOptional = FALSE; } else { $booleanComponent = $validator->getComponentByFormName($this->timeIsOptionalComponentName); $validator->validateComponent($booleanComponent); $this->timeIsOptional = $booleanComponent->getFormValue(); } }
public function onValidation(\Psc\Form\ComponentsValidator $validator) { // dependency zu yearKnown $this->setYearKnown($validator->validateComponent($validator->getComponentByFormName('yearKnown'))->getFormValue()); }
protected function initComponentsValidator(\Psc\Form\ComponentsValidator $componentsValidator) { foreach ($this->optionalProperties as $property) { $componentsValidator->setOptional($property); } }
public function onPostValidation(ComponentsValidator $validator, \Closure $do) { $entity = $this->validationEntity; $validator->addPostValidation(new \Psc\Code\Callback(function ($componentsValidator, $validatedComponents) use($entity, $do) { $do($entity, $componentsValidator, $validatedComponents); })); }