Ejemplo n.º 1
0
 protected function getLayout()
 {
     $layout = array();
     $hidden = array();
     $controls = $this->getControls();
     foreach ($controls as $control) {
         if ($control->visible) {
             if (is_array($control)) {
                 $array = array();
                 foreach ($control as $field) {
                     if ($field->visible) {
                         $array[] = $field;
                     }
                 }
                 $control = new MHContainer('', $array);
                 $control->setShowLabel(true);
             } elseif ($control instanceof MHiddenField) {
                 $hidden[] = $control;
             } else {
                 $this->hasLabel |= $control->getLabel() != '';
                 $this->hasHint |= $control->getHint() != '';
                 $layout[] = $control;
             }
         }
     }
     return array($layout, $hidden);
 }