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


PHP InputDocument::create方法代码示例

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


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

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

示例3: create

 /**
  * Create InputDocument for a Process
  *
  * @param string $processUid Unique id of Process
  * @param array  $arrayData  Data
  *
  * return array Return data of the new InputDocument created
  */
 public function create($processUid, $arrayData)
 {
     try {
         $arrayData = array_change_key_case($arrayData, CASE_UPPER);
         unset($arrayData["INP_DOC_UID"]);
         //Verify data
         $process = new \ProcessMaker\BusinessModel\Process();
         $process->throwExceptionIfNotExistsProcess($processUid, $this->arrayFieldNameForException["processUid"]);
         $process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, true);
         $this->throwExceptionIfExistsTitle($processUid, $arrayData["INP_DOC_TITLE"], $this->arrayFieldNameForException["inputDocumentTitle"]);
         //Flags
         $flagDataDestinationPath = isset($arrayData["INP_DOC_DESTINATION_PATH"]) ? 1 : 0;
         $flagDataTags = isset($arrayData["INP_DOC_TAGS"]) ? 1 : 0;
         //Create
         $inputDocument = new \InputDocument();
         $arrayData["PRO_UID"] = $processUid;
         $arrayData["INP_DOC_DESTINATION_PATH"] = $flagDataDestinationPath == 1 ? $arrayData["INP_DOC_DESTINATION_PATH"] : "";
         $arrayData["INP_DOC_TAGS"] = $flagDataTags == 1 ? $arrayData["INP_DOC_TAGS"] : "";
         $inputDocumentUid = $inputDocument->create($arrayData);
         //Return
         unset($arrayData["PRO_UID"]);
         if ($flagDataDestinationPath == 0) {
             unset($arrayData["INP_DOC_DESTINATION_PATH"]);
         }
         if ($flagDataTags == 0) {
             unset($arrayData["INP_DOC_TAGS"]);
         }
         $arrayData = array_merge(array("INP_DOC_UID" => $inputDocumentUid), $arrayData);
         if (!$this->formatFieldNameInUppercase) {
             $arrayData = array_change_key_case($arrayData, CASE_LOWER);
         }
         return $arrayData;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:44,代码来源:InputDocument.php

示例4: createInputRows

    /**

     * Create Input Documents Rows from an array, removing those Objects

     * with the same UID, and recreaiting the records from the array data.

     *

     * @param $aInput array.

     * @return void

     */

    public function createInputRows ($aInput)

    {

        foreach ($aInput as $key => $row) {

            $oInput = new InputDocument();

            //unset ($row['TAS_UID']);

            if ($oInput->InputExists( $row['INP_DOC_UID'] )) {

                $oInput->remove( $row['INP_DOC_UID'] );

            }

            $res = $oInput->create( $row );

        }

        return;

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:37,代码来源:class.processes.php

示例5: 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


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