Exemplo n.º 1
0
 /**
  * @param Form $form
  * @return mixed
  */
 public function formOpen(Form $form)
 {
     $options = $form->getAttributes();
     $options['files'] = $form->files;
     if ($action = $form->action) {
         $options[$form->actionType] = $action;
     }
     if ($model = $form->model) {
         $html = $this->builder->model($model, $options);
         $form->fill(array_dot($model->toArray()));
     } else {
         $html = $this->builder->open($options);
     }
     return $html;
 }
Exemplo n.º 2
0
 /**
  * @return Form
  */
 protected function _form()
 {
     if (is_null($this->_form)) {
         $this->_form = $this->form();
         $this->_form->setProperty('allowFieldOverwrite', true);
     }
     return $this->_form;
 }