Esempio n. 1
0
 public function morph()
 {
     foreach ($this->inputs as $key => $input) {
         if (!$input instanceof FormInput) {
             $input = new FormInput($input);
         }
         foreach ($this->styles as $style => $v) {
             if ($input->isAllowedStyle($style)) {
                 $input->getTag()->setStyle($style, $v);
             }
         }
         if ($this->getOption('wrap', TRUE)) {
             $wrapper = HTML::tag('div', new \stdClass(), array('class' => 'input-set-wrapper'));
             $wrapper->content->input = $input;
             $wrapper->content->input->morph();
             $this->elements[$key] = $wrapper;
         } else {
             $input->morph();
             $this->elements[$key] = $input;
         }
     }
     $this->morphed = TRUE;
     return $this;
 }