Пример #1
0
 /**
  * Setup form.
  *
  * @param Form $form
  * @return $this
  */
 public function setForm(Form $form)
 {
     $this->_form = $form;
     if (!isset($this->type)) {
         $this->_setType();
     }
     $this->_domain = $form->getDomain();
     return $this;
 }
Пример #2
0
 /**
  * Setup xml form data.
  *
  * @return $this
  */
 protected function _setXmlData()
 {
     $path = $this->_path;
     if (!$path) {
         $path = Path::xmlActionForm($this->request);
     }
     $xmlForm = Form::getInstance($this->_name, $path, $this->_View);
     $xmlForm->bind($this->_entity);
     $this->_xml = $xmlForm;
     return $this;
 }