Example #1
0
 /**
  * Extracts all values from the given form and returns
  * an array with the field path and the field value.
  * 
  * @param \Zepi\Web\UserInterface\Form\Form $form
  * @return array
  */
 protected function extractFormValues(Form $form)
 {
     $values = array();
     foreach ($form->getChildrenByType('\\Zepi\\Web\\UserInterface\\Form\\Field\\FieldAbstract', true) as $field) {
         if ($field->getValue() === null) {
             continue;
         }
         $values[$field->getPath($form)] = $field->getValue();
     }
     return $values;
 }