/** * Get the children of the current element * @return \UForm\Form\Element[] */ public function getChildren() { if ($this->element instanceof Element\Container) { return $this->element->getElements($this->getLocalValue()); } return []; }
public function childrenAreValid() { if ($this->element instanceof Container) { foreach ($this->element->getElements($this->getValue()) as $element) { if (!$this->formContext->elementIsValid($element)) { return false; } if (!$this->formContext->childrenAreValid($element)) { return false; } } } return true; }