Пример #1
0
 protected function handleFields(FcForm $fc_form, $all = false, $list = false)
 {
     if (is_null($this->steps_count)) {
         $this->steps_count = 1;
     }
     foreach ($fc_form->getFields($all) as $fc_field) {
         $custom_widget = $fc_field->getCustomWidget();
         if ($custom_widget and $list) {
             $not_for_handle = $custom_widget->getIsWidget();
         } else {
             $not_for_handle = 0;
         }
         if ($fc_field->isCustom() && !$not_for_handle) {
             $this->handleFields($custom_widget, $all);
         } else {
             if ('hidden' == $fc_field->getType()) {
                 $fc_field->setStep(1);
                 $this->fields = array($fc_field->getName() => $fc_field) + $this->fields;
             } else {
                 $fc_field->setStep($this->steps_count);
                 $this->fields[$fc_field->getName()] = $fc_field;
             }
             if ('step' == $fc_field->getType()) {
                 $this->steps_count++;
             }
         }
     }
 }