kernel/lib/Form.php
public function getFormInObject()
    {
        $sExKey = null;

        if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {

            $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);
            $oModel = new $sModelName;

            $oEntity = new $this->_sSynchronizeEntity;
            $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);
            $sMethodName = 'findOneBy'.$sPrimaryKey;
            $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));

            if (is_object($oCompleteEntity)) {

                foreach ($this->_aElement as $sKey => $sValue) {

					if ($sValue instanceof \Venus\lib\Form\Input && $sValue->getType() == 'submit') {
						continue;
					}
					
                    if ($sValue instanceof \Venus\lib\Form\Radio) {

                        $sExKey = $sKey;
                        $sKey = substr($sKey, 0, -6);
                    }

                    if ($sValue instanceof Form) {

                        ;
                    } else {

                        $sMethodNameInEntity = 'get_'.$sKey;
						if (method_exists($oCompleteEntity, $sMethodNameInEntity)) {
							$mValue = $oCompleteEntity->$sMethodNameInEntity();
						}

                        if ($sValue instanceof \Venus\lib\Form\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {

                            $this->_aElement[$sExKey]->setValueChecked($mValue);
                        } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {

                            $this->_aElement[$sKey]->setValue($mValue);
                        }
                    }
                }
            }
        }

        $oForm = new \StdClass();
        $oForm->start = '<form name="form'.$this->_iFormNumber.'" method="post" enctype="multipart/form-data"><input type="hidden" value="1" name="validform'.$this->_iFormNumber.'">';
        $oForm->form = array();

        foreach ($this->_aElement as $sKey => $sValue) {

            if ($sValue instanceof Container) {

                $oForm->form[$sKey] = $sValue;
            } else {

                $oForm->form[$sKey] = $sValue->fetch();
            }
        }

        $oForm->end = '</form>';

        return $oForm;
    }
public function getFormInObject()
    {
        $sExKey = null;

        if ($this->_iIdEntity > 0 && $this->_sSynchronizeEntity !== null && count($_POST) < 1) {

            $sModelName = str_replace('Entity', 'Model', $this->_sSynchronizeEntity);
            $oModel = new $sModelName;

            $oEntity = new $this->_sSynchronizeEntity;
            $sPrimaryKey = LibEntity::getPrimaryKeyNameWithoutMapping($oEntity);
            $sMethodName = 'findOneBy'.$sPrimaryKey;
            $oCompleteEntity = call_user_func_array(array(&$oModel, $sMethodName), array($this->_iIdEntity));

            if (is_object($oCompleteEntity)) {

                foreach ($this->_aElement as $sKey => $sValue) {

					if ($sValue instanceof \Venus\lib\Form\Input && $sValue->getType() == 'submit') {
						continue;
					}
					
                    if ($sValue instanceof \Venus\lib\Form\Radio) {

                        $sExKey = $sKey;
                        $sKey = substr($sKey, 0, -6);
                    }

                    if ($sValue instanceof Form) {

                        ;
                    } else {

                        $sMethodNameInEntity = 'get_'.$sKey;
						if (method_exists($oCompleteEntity, $sMethodNameInEntity)) {
							$mValue = $oCompleteEntity->$sMethodNameInEntity();
						}

                        if ($sValue instanceof \Venus\lib\Form\Radio && method_exists($this->_aElement[$sExKey], 'setValueChecked')) {

                            $this->_aElement[$sExKey]->setValueChecked($mValue);
                        } else if (isset($mValue) && method_exists($this->_aElement[$sKey], 'setValue')) {

                            $this->_aElement[$sKey]->setValue($mValue);
                        }
                    }
                }
            }
        }

        $oForm = new \StdClass();
        $oForm->start = '<form name="form'.$this->_iFormNumber.'" method="post" enctype="multipart/form-data"><input type="hidden" value="1" name="validform'.$this->_iFormNumber.'">';
        $oForm->form = array();

        foreach ($this->_aElement as $sKey => $sValue) {

            if ($sValue instanceof Container) {

                $oForm->form[$sKey] = $sValue;
            } else {

                $oForm->form[$sKey] = $sValue->fetch();
            }
        }

        $oForm->end = '</form>';

        return $oForm;
    }
get global object form

@access public
@return \stdClass