Esempio n. 1
0
 public function add(FormInterface $child, $type = null, array $options = array())
 {
     $this->children[$child->getName()];
 }
Esempio n. 2
0
 public function add(FormInterface $child)
 {
     $name = $child->getName();
     $this->children[$name] = $child;
     $child->parent = $this;
 }
Esempio n. 3
0
File: Form.php Progetto: itav/form
 /**
  * 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;
 }