public function add(FormInterface $child, $type = null, array $options = array()) { $this->children[$child->getName()]; }
public function add(FormInterface $child) { $name = $child->getName(); $this->children[$name] = $child; $child->parent = $this; }
/** * Funkcja rekurencyjna zwracająca zmergowaną tablice wszystkich validRules w wszystkich elementów formularza.. * * @param FormInterface $obj * @return array */ private function getElementValidRules($obj) { $rules = []; foreach ($obj->getElements() as $element) { if ($element instanceof FieldSet) { $rules = array_merge($rules, $this->getElementValidRules($element)); continue; } if (!empty($element->getValidRules())) { $rules[$element->getName()] = $element->getValidRules(); } } return $rules; }