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


PHP InputDocument::update方法代码示例

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


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

示例1: saveInputDoc

 public function saveInputDoc($params)
 {
     require_once 'classes/model/InputDocument.php';
     G::LoadClass('processMap');
     $aData = array();
     $aData['PRO_UID'] = $params->PRO_UID;
     $aData['INP_DOC_UID'] = $params->INP_DOC_UID;
     $aData['INP_DOC_TITLE'] = $params->INP_DOC_TITLE;
     $aData['INP_DOC_FORM_NEEDED'] = $params->INP_DOC_FORM_NEEDED;
     if ($aData['INP_DOC_FORM_NEEDED'] != 'VIRTUAL') {
         $aData['INP_DOC_ORIGINAL'] = $params->INP_DOC_ORIGINAL;
     } else {
         $aData['INP_DOC_ORIGINAL'] = 'ORIGINAL';
     }
     $aData['INP_DOC_VERSIONING'] = $params->INP_DOC_VERSIONING;
     $aData['INP_DOC_DESCRIPTION'] = $params->INP_DOC_DESCRIPTION;
     $aData['INP_DOC_DESTINATION_PATH'] = $params->INP_DOC_DESTINATION_PATH;
     $aData['INP_DOC_TAGS'] = $params->INP_DOC_TAGS;
     $oInputDocument = new InputDocument();
     if ($aData['INP_DOC_UID'] == '') {
         unset($aData['INP_DOC_UID']);
         $oInputDocument->create($aData);
         $this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_NEW');
     } else {
         $oInputDocument->update($aData);
         $this->msg = G::LoadTranslation('ID_INPUT_DOC_SUCCESS_UPDATE');
     }
     //refresh dbarray with the last change in inputDocument
     $oMap = new processMap();
     $oCriteria = $oMap->getInputDocumentsCriteria($aData['PRO_UID']);
     $this->success = true;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:32,代码来源:processOptionsProxy.php

示例2: update

 /**
  * Update InputDocument
  *
  * @param string $inputDocumentUid Unique id of InputDocument
  * @param array  $arrayData        Data
  *
  * return array Return data of the InputDocument updated
  */
 public function update($inputDocumentUid, $arrayData)
 {
     try {
         $arrayData = array_change_key_case($arrayData, CASE_UPPER);
         //Verify data
         $this->throwExceptionIfNotExistsInputDocument($inputDocumentUid, "", $this->arrayFieldNameForException["inputDocumentUid"]);
         //Load InputDocument
         $inputDocument = new \InputDocument();
         $arrayInputDocumentData = $inputDocument->load($inputDocumentUid);
         $processUid = $arrayInputDocumentData["PRO_UID"];
         //Verify data
         $process = new \ProcessMaker\BusinessModel\Process();
         $process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, false);
         if (isset($arrayData["INP_DOC_TITLE"])) {
             $this->throwExceptionIfExistsTitle($processUid, $arrayData["INP_DOC_TITLE"], $this->arrayFieldNameForException["inputDocumentTitle"], $inputDocumentUid);
         }
         //Update
         $arrayData["INP_DOC_UID"] = $inputDocumentUid;
         $result = $inputDocument->update($arrayData);
         \G::LoadClass('pmDynaform');
         $pmDynaform = new \pmDynaform();
         $pmDynaform->synchronizeInputDocument($processUid, $arrayData);
         //Return
         unset($arrayData["INP_DOC_UID"]);
         if (!$this->formatFieldNameInUppercase) {
             $arrayData = array_change_key_case($arrayData, CASE_LOWER);
         }
         return $arrayData;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:40,代码来源:InputDocument.php

示例3: InputDocument

                $oDataset1->next();
                $aRow1 = $oDataset1->getRow();
                if ($aRow1['INPUTS']) {
                    $flag = false;
                }
            }
            print $flag;
            break;
        default:
            require_once 'classes/model/InputDocument.php';
            G::LoadClass('processMap');
            $oInputDocument = new InputDocument();
            if (isset($_POST['form'])) {
                $aData = $_POST['form'];
            } else {
                $aData = $_POST;
            }
            if ($aData['INP_DOC_UID'] == '') {
                unset($aData['INP_DOC_UID']);
                $oInputDocument->create($aData);
            } else {
                $oInputDocument->update($aData);
            }
            //refresh dbarray with the last change in inputDocument
            $oMap = new processMap();
            $oCriteria = $oMap->getInputDocumentsCriteria($aData['PRO_UID']);
            break;
    }
} catch (Exception $oException) {
    die($oException->getMessage());
}
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:inputdocs_Save.php

示例4: updateTest

 function updateTest($aTestData, $aFields)
 {
     $oInputDocument = new InputDocument();
     try {
         return $oInputDocument->update($aFields);
     } catch (Exception $oError) {
         return $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:9,代码来源:classInputDocumentTest.php


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