当前位置: 首页>>代码示例>>PHP>>正文


PHP BizSystem::objectFactory方法代码示例

本文整理汇总了PHP中BizSystem::objectFactory方法的典型用法代码示例。如果您正苦于以下问题:PHP BizSystem::objectFactory方法的具体用法?PHP BizSystem::objectFactory怎么用?PHP BizSystem::objectFactory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BizSystem的用法示例。


在下文中一共展示了BizSystem::objectFactory方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getInvokeAction

 public function getInvokeAction()
 {
     if ($this->m_FormedFunction) {
         return $this->m_FormedFunction;
     }
     $name = $this->_elemName;
     $ehName = $this->m_Name;
     $formobj = BizSystem::objectFactory()->getObject($this->_formName);
     if (!$this->m_FormedFunction) {
         // add direct URL support
         if ($this->m_URL) {
             $_func = "loadPage('" . $this->m_URL . "');";
         } else {
             if (strpos($this->m_Function, "js:") === 0) {
                 $_func = substr($this->m_Function, 3) . ";";
             } else {
                 $temp = $this->m_FunctionType == null ? "" : ",'" . $this->m_FunctionType . "'";
                 //$_func = "SetOnElement('$name:$ehName'); Openbiz.CallFunction('" . $this->m_Function . "'$temp);";
                 list($funcName, $funcParams) = $this->parseFunction($this->m_Function);
                 $funcParams = Expression::evaluateExpression($funcParams, $formobj);
                 $action = "{$name}:{$ehName}";
                 // TODO: encrypt paramString to add more security
                 $_func = "Openbiz.invoke('{$this->_formName}','{$action}','{$funcParams}'{$temp});";
             }
         }
         //$_func = Expression::evaluateExpression($_func, $formobj);
         $this->m_FormedFunction = $_func;
     }
     return $this->m_FormedFunction;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:30,代码来源:Element.php

示例2: saveSessionObjects

 /**
  * Save session variables of all stateful objects into sessionid_obj file
  *
  * @return void
  **/
 public function saveSessionObjects()
 {
     if ($this->_sessObjFileName == null) {
         return;
     }
     // loop all objects (bizview, bizform, bizdataobj) collect their session vars
     $allobjs = BizSystem::objectFactory()->getAllObjects();
     foreach ($allobjs as $obj) {
         if (method_exists($obj, "SetSessionVars")) {
             //after calling $obj->setSessionVars SessObjArr and StatefulSessObjArr are filled
             $obj->setSessionVars($this);
         }
         // if previous view's object is used in current view, don't discard its session data
         if (isset($obj->m_Name) && key_exists($obj->m_Name, $this->_prevViewObjNames)) {
             unset($this->_prevViewObjNames[$obj->m_Name]);
         }
     }
     // discard useless previous view's session objects
     //foreach($this->_prevViewObjNames as $objName=>$tmp)
     //    unset($this->_sessObjArr[$objName]);
     $this->_sessObjArr["ViewHist"] = $this->_viewHistory;
     $this->setVar(OB_TRANSIENT_DATA_SESSION_INDEX, $this->_sessObjArr);
     $this->setVar(OB_STATEFUL_DATA_SESSION_INDEX, $this->_statefulSessObjArr);
 }
开发者ID:que273,项目名称:siremis,代码行数:29,代码来源:SessionContext.php

示例3: cancel

 /**
  * Cancel, clean up the sessions of view and all forms
  *
  * @return void
  */
 public function cancel()
 {
     // call all step forms Cancel method
     foreach ($this->m_FormStates as $formName => $state) {
         if ($state['visited']) {
             BizSystem::objectFactory()->getObject($formName)->cancel();
         }
     }
     $this->m_DropSession = true;
 }
开发者ID:que273,项目名称:siremis,代码行数:15,代码来源:EasyViewWizard.php

示例4: addToParent

 /**
  * Add a record (popup) to the parent form if OK button clicked, (M-M or M-1/1-1)
  *
  * @return void
  */
 public function addToParent($recIds = null)
 {
     if (!is_array($recIds)) {
         $recIdArr = array();
         $recIdArr[] = $recIds;
     } else {
         $recIdArr = $recIds;
     }
     /* @var $parentForm EasyForm */
     $parentForm = BizSystem::objectFactory()->getObject($this->m_ParentFormName);
     foreach ($recIdArr as $recId) {
         //clear parent form search rules
         $this->m_SearchRule = "";
         $parentForm->getDataObj()->clearSearchRule();
         $do = $this->getDataObj();
         $baseSearchRule = $do->m_BaseSearchRule;
         $do->m_BaseSearchRule = "";
         $do->clearSearchRule();
         $rec = $do->fetchById($recId);
         $do->m_BaseSearchRule = $baseSearchRule;
         if (!$rec) {
             $rec = BizSystem::getObject($do->m_Name, 1)->fetchById($recId);
         }
         // add record to parent form's dataObj who is M-M or M-1/1-1 to its parent dataobj
         $ok = $parentForm->getDataObj()->addRecord($rec, $bPrtObjUpdated);
         if (!$ok) {
             return $parentForm->processDataObjError($ok);
         }
     }
     $this->close();
     $parentForm->rerender();
     if ($parentForm->m_ParentFormName) {
         $parentForm->renderParent();
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:40,代码来源:PickerForm.php

示例5: processURL

 /**
  * Process URL to get the form param and add the form in the FormRefs
  *
  * @return void
  */
 protected function processURL()
 {
     // if url has form=...
     $paramForm = isset($_GET['form']) ? $_GET['form'] : null;
     $paramCForm = isset($_GET['cform']) ? $_GET['cform'] : null;
     if (!$paramForm) {
         return;
     }
     // add the form in FormRefs
     if ($paramForm) {
         if ($this->isInFormRefLibs($paramForm)) {
             $xmlArr["ATTRIBUTES"]["NAME"] = $paramForm;
             $xmlArr["ATTRIBUTES"]["SUBFORMS"] = $paramCForm ? $paramCForm : "";
             $formRef = new FormReference($xmlArr);
             $this->m_FormRefs->set($paramForm, $formRef);
             if ($paramCForm) {
                 if ($this->isInFormRefLibs($paramCForm)) {
                     $xmlArr["ATTRIBUTES"]["NAME"] = $paramCForm;
                     $xmlArr["ATTRIBUTES"]["SUBFORMS"] = "";
                     $cformRef = new FormReference($xmlArr);
                     $this->m_FormRefs->set($paramCForm, $cformRef);
                 }
             }
         }
     }
     // check url arg as fld:name=val
     $getKeys = array_keys($_GET);
     $paramFields = null;
     foreach ($getKeys as $key) {
         if (substr($key, 0, 4) == "fld:") {
             $fieldName = substr($key, 4);
             $fieldValue = $_GET[$key];
             $paramFields[$fieldName] = $fieldValue;
         }
     }
     if (!$paramFields) {
         return;
     }
     $paramForm = $this->prefixPackage($paramForm);
     $formObj = BizSystem::objectFactory()->getObject($paramForm);
     $formObj->setRequestParams($paramFields);
 }
开发者ID:que273,项目名称:siremis,代码行数:47,代码来源:DynaView.php

示例6: getDataTable

 /**
  * Get raw data to display in the spreadsheet. header and data table
  *
  * @param string $objName
  * @return array
  */
 protected function getDataTable($objName)
 {
     /* @var $formObj EasyForm */
     $formObj = BizSystem::objectFactory()->getObject($objName);
     // get the existing EasyForm|BizForm object
     // if BizForm, call BizForm::renderTable
     if ($formObj instanceof BizForm) {
         $dataTable = $formObj->renderTable();
     }
     // if EasyForm, call EasyForm->DataPanel::renderTable
     if ($formObj instanceof EasyForm) {
         $recordSet = $formObj->fetchDataSet();
         $dataSet = $formObj->m_DataPanel->renderTable($recordSet);
         foreach ($dataSet['elems'] as $elem) {
             $labelRow[] = $elem['label'];
         }
         $dataTable = array_merge(array($labelRow), $dataSet['data']);
     }
     return $dataTable;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:26,代码来源:excelService.php

示例7: addToParent

 /**
  * Add a record (popup) to the parent form if OK button clicked, (M-M or M-1/1-1)
  *
  * @return void
  */
 public function addToParent($recId = null)
 {
     $rec = $this->getActiveRecord($recId);
     /* @var $parentForm EasyForm */
     $parentForm = BizSystem::objectFactory()->getObject($this->m_ParentFormName);
     // add record to parent form's dataObj who is M-M or M-1/1-1 to its parent dataobj
     $ok = $parentForm->getDataObj()->addRecord($rec, $bPrtObjUpdated);
     if (!$ok) {
         return $parentForm->processDataObjError($ok);
     }
     $this->close();
     $parentForm->rerender();
     // just keep it simple, don't refresh parent's parent form :)
 }
开发者ID:que273,项目名称:siremis,代码行数:19,代码来源:PickerForm.php

示例8: processRequest

 /**
  * Process request
  *
  * @return void
  */
 protected function processRequest()
 {
     // if url has form=...
     $paramForm = isset($_REQUEST['form']) ? $_REQUEST['form'] : null;
     // check url arg as fld:name=val
     $getKeys = array_keys($_REQUEST);
     $pageid = $_GET["pageid"];
     $paramFields = null;
     foreach ($getKeys as $key) {
         if (substr($key, 0, 4) == "fld:") {
             $fieldName = substr($key, 4);
             $fieldValue = $_REQUEST[$key];
             $paramFields[$fieldName] = $fieldValue;
         }
     }
     if (!$paramFields && !$pageid) {
         return;
     }
     // get the form object
     if (!$paramForm) {
         // get the first form name if no form is given
         foreach ($this->m_FormRefs as $formRef) {
             $paramForm = $formRef->m_Name;
             break;
         }
     }
     if (!$paramForm) {
         return;
     }
     $paramForm = $this->prefixPackage($paramForm);
     $formObj = BizSystem::objectFactory()->getObject($paramForm);
     $formObj->setRequestParams($paramFields);
     if ($pageid) {
         $formObj->setCurrentPage($pageid);
     }
 }
开发者ID:que273,项目名称:siremis,代码行数:41,代码来源:EasyView.php

示例9: getDataTable

 /**
  * Get raw data to display in the spreadsheet. header and data table
  *
  * @param string $objName
  * @return array
  */
 protected function getDataTable($objName)
 {
     /* @var $formObj EasyForm */
     $formObj = BizSystem::objectFactory()->getObject($objName);
     // get the existing EasyForm|BizForm object
     // if BizForm, call BizForm::renderTable
     if ($formObj instanceof BizForm) {
         $dataTable = $formObj->renderTable();
     }
     // if EasyForm, call EasyForm->DataPanel::renderTable
     if ($formObj instanceof EasyForm) {
         $recordSet = $formObj->fetchDataSet();
         $dataSet = $formObj->m_DataPanel->renderTable($recordSet);
         foreach ($dataSet['elems'] as $elem) {
             $labelRow[] = $elem['label'];
         }
         //If no datasets, return only labelrow to enable gracful export
         //to avoid error message as a result of trying to apply array_merge
         //on a null variable
         //Cyril Ogana 2012-01-28 23:30
         if (count($dataSet['data'])) {
             $dataTable = array_merge(array($labelRow), $dataSet['data']);
         } else {
             $dataTable = array($labelRow);
         }
     }
     return $dataTable;
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:34,代码来源:excelService.php

示例10: prepareSubFormsDataObj

 protected function prepareSubFormsDataObj()
 {
     if ($this->m_SubForms && $this->getDataObj()) {
         foreach ($this->m_SubForms as $subForm) {
             $formObj = BizSystem::objectFactory()->getObject($subForm);
             $dataObj = $this->getDataObj()->getRefObject($formObj->m_DataObjName);
             if ($dataObj) {
                 $formObj->setDataObj($dataObj);
             }
         }
     }
 }
开发者ID:Why-Not-Sky,项目名称:cubi-ng,代码行数:12,代码来源:BaseForm.php

示例11: getFormObj

 protected function getFormObj()
 {
     return BizSystem::objectFactory()->getObject($this->m_FormName);
 }
开发者ID:que273,项目名称:siremis,代码行数:4,代码来源:Panel.php

示例12: rerenderSubForms

 /**
  * Rerender sub forms who has dependecy on this form.
  * This method is called when parent form's change affect the sub forms
  *
  * @return void
  */
 protected function rerenderSubForms()
 {
     if (!$this->m_SubForms) {
         return;
     }
     foreach ($this->m_SubForms as $subForm) {
         $formObj = BizSystem::objectFactory()->getObject($subForm);
         $dataObj = $this->getDataObj()->getRefObject($formObj->m_DataObjName);
         if ($dataObj) {
             $formObj->setDataObj($dataObj);
         }
         $formObj->rerender();
     }
     return;
 }
开发者ID:que273,项目名称:siremis,代码行数:21,代码来源:EasyForm.php

示例13: runSearch

 /**
  * Run search on query mode, then go read mode
  *
  * @return void
  */
 public function runSearch($targetForm = null)
 {
     BizSystem::log(LOG_DEBUG, "FORMOBJ", $this->m_Name . "::runSearch(), SearchRule=" . $this->m_SearchRule);
     global $g_BizSystem;
     $searchRule = "";
     foreach ($this->m_RecordRow as $fldCtrl) {
         $value = BizSystem::clientProxy()->getFormInputs($fldCtrl->m_Name);
         if ($value) {
             $searchStr = $this->inputValToRule($fldCtrl->m_BizFieldName, $value);
             if ($searchRule == "") {
                 $searchRule .= $searchStr;
             } else {
                 $searchRule .= " AND " . $searchStr;
             }
         }
     }
     if ($targetForm) {
         $tgtForm = BizSystem::objectFactory()->getObject($targetForm);
         if ($tgtForm) {
             $tgtForm->setSearchRule($searchRule);
             return $tgtForm->rerender();
         }
         return;
     }
     $this->m_SearchRule = $searchRule;
     //$this->SetDisplayMode (MODE_R);
     $this->gotoPage(1);
     $this->m_ClearSearchRule = true;
     $this->rerender();
 }
开发者ID:que273,项目名称:siremis,代码行数:35,代码来源:BizForm_Lite.php


注:本文中的BizSystem::objectFactory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。