예제 #1
0
파일: FormField.php 프로젝트: Cheren/union
 /**
  * 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;
 }