Ejemplo n.º 1
0
 /**
  * Add forms element to a view model
  * @param Fieldset  $form
  * @param ViewModel $parentViewModel
  */
 protected function buildFormViewModel(Fieldset $form, ViewModel &$parentViewModel)
 {
     foreach ($form->getIterator() as $item) {
         if ($item instanceof Fieldset) {
             $this->buildFieldSetViewModel($item, $parentViewModel);
         } elseif ($item instanceof Element) {
             $this->addElementViewModel($item, $parentViewModel);
         }
     }
 }