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


PHP Process::isBpmnProcess方法代码示例

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


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

示例1: evaluateVariable

 public function evaluateVariable()
 {
     $process = new Process();
     if (!$process->isBpmnProcess($_SESSION['PROCESS'])) {
         return;
     }
     require_once PATH_CORE . 'controllers/pmTablesProxy.php';
     $pmTablesProxy = new pmTablesProxy();
     $variableModule = new ProcessMaker\BusinessModel\Variable();
     $searchTypes = array('checkgroup', 'dropdown', 'suggest');
     $processVariables = $pmTablesProxy->getDynaformVariables($_SESSION['PROCESS'], $searchTypes, false);
     $variables = $this->affected_fields;
     $variables = array_unique($variables);
     $newFields = array();
     $arrayValues = array();
     $arrayLabels = array();
     if (is_array($variables) && is_array($processVariables)) {
         foreach ($variables as $var) {
             if (strpos($var, '_label') === false) {
                 if (in_array($var, $processVariables)) {
                     if (isset($this->aFields[$var]) && is_array($this->aFields[$var][1])) {
                         $varLabel = $var . '_label';
                         $arrayValue = $this->aFields[$var];
                         if (is_array($arrayValue) && sizeof($arrayValue)) {
                             foreach ($arrayValue as $val) {
                                 if (is_array($val)) {
                                     $val = array_values($val);
                                     $arrayValues[] = $val[0];
                                     $arrayLabels[] = $val[1];
                                 }
                             }
                             if (sizeof($arrayLabels)) {
                                 $varInfo = $variableModule->getVariableTypeByName($_SESSION['PROCESS'], $var);
                                 if (is_array($varInfo) && sizeof($varInfo)) {
                                     $varType = $varInfo['VAR_FIELD_TYPE'];
                                     switch ($varType) {
                                         case 'array':
                                             $arrayLabels = '["' . implode('","', $arrayLabels) . '"]';
                                             $newFields[$var] = $arrayValues;
                                             $newFields[$varLabel] = $arrayLabels;
                                             break;
                                         case 'string':
                                             $newFields[$var] = $arrayValues[0];
                                             $newFields[$varLabel] = $arrayLabels[0];
                                             break;
                                     }
                                     $this->affected_fields[] = $varLabel;
                                     $this->aFields = array_merge($this->aFields, $newFields);
                                     unset($newFields);
                                     unset($arrayValues);
                                     unset($arrayLabels);
                                 }
                             }
                         }
                     }
                     if (isset($this->aFields[$var]) && is_string($this->aFields[$var])) {
                         $varInfo = $variableModule->getVariableTypeByName($_SESSION['PROCESS'], $var);
                         $options = G::json_decode($varInfo["VAR_ACCEPTED_VALUES"]);
                         $no = count($options);
                         for ($io = 0; $io < $no; $io++) {
                             if ($options[$io]->value === $this->aFields[$var]) {
                                 $this->aFields[$var . "_label"] = $options[$io]->label;
                             }
                         }
                         if ($varInfo["VAR_DBCONNECTION"] !== "" && $varInfo["VAR_DBCONNECTION"] !== "none" && $varInfo["VAR_SQL"] !== "") {
                             try {
                                 $cnn = Propel::getConnection($varInfo["VAR_DBCONNECTION"]);
                                 $stmt = $cnn->createStatement();
                                 $sql = G::replaceDataField($varInfo["VAR_SQL"], $this->aFields);
                                 $rs = $stmt->executeQuery($sql, \ResultSet::FETCHMODE_NUM);
                                 while ($rs->next()) {
                                     $row = $rs->getRow();
                                     if ($row[0] === $this->aFields[$var]) {
                                         $this->aFields[$var . "_label"] = isset($row[1]) ? $row[1] : $row[0];
                                     }
                                 }
                             } catch (Exception $e) {
                             }
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:85,代码来源:class.pmScript.php

示例2: htmlentities

while ($rsSql->next()) {
    $row = $rsSql->getRow();

    $processUid  = $row["PRO_UID"];
    $proTitle    = $row["PROCESS_TITLE"];
    $taskUid     = $row["TAS_UID"];
    $taskTitle   = $row["TASK_TITLE"];
    $dynaformUid = $row["DYN_UID"];

    $tabTitle = $taskTitle . " (" . (($activeNumRows > 0)? $row["NUMREC"] : 0) . ")";

    $grdTitle = htmlentities($proTitle . " / " . $tabTitle, ENT_QUOTES, "UTF-8");
    $tabTitle = htmlentities(substr($proTitle, 0, 25) . ((strlen($proTitle) > 25)? "..." : null) . " / " . $tabTitle, ENT_QUOTES, "UTF-8");

    $oProcess = new Process();
    $isBpmn   = $oProcess->isBpmnProcess($processUid);
    if($isBpmn){
        $arrayTabItem[] = "
        {
            title: \"<span onmouseover=\\\"toolTipTab('$grdTitle', 1);\\\" onmouseout=\\\"toolTipTab('', 0);\\\">$tabTitle</span>\",
            listeners: {
                activate: function ()
                {
                      generateGrid(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
                }
            }
        }";
    }else{
        $arrayTabItem[] = "
        {
            title: \"<span onmouseover=\\\"toolTipTab('$grdTitle', 1);\\\" onmouseout=\\\"toolTipTab('', 0);\\\">$tabTitle</span>\",
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:casesConsolidatedListExtJs.php

示例3: edit

 /**
  * edit pmtable
  *
  * @param string $httpData->id
  */
 public function edit($httpData)
 {
     require_once PATH_CONTROLLERS . 'pmTablesProxy.php';
     require_once 'classes/model/AdditionalTables.php';
     G::loadClass('pmTable');
     $additionalTables = new AdditionalTables();
     $table = false;
     $addTabUid = isset($httpData->id) ? $httpData->id : false;
     $dataNumRows = 0;
     $repTabPluginPermissions = false;
     $columnsTypes = PmTable::getPropelSupportedColumnTypes();
     $jsFile = isset($httpData->tableType) && $httpData->tableType == 'report' ? 'editReport' : 'edit';
     $columnsTypesList = array();
     foreach ($columnsTypes as $columnTypeName => $columnType) {
         $columnsTypesList[] = array($columnTypeName, $columnType);
     }
     if ($addTabUid) {
         $tableData = $additionalTables->getAllData($httpData->id, 0, 2);
         $dataNumRows = $tableData['count'];
     }
     if ($addTabUid !== false) {
         // if it is a edit request
         $tableFields = array();
         $fieldsList = array();
         $table = $additionalTables->load($addTabUid, true);
         //fix for backware compatibility
         $table['DBS_UID'] = $table['DBS_UID'] == null || $table['DBS_UID'] == '' ? 'workflow' : $table['DBS_UID'];
         $_SESSION['ADD_TAB_UID'] = $addTabUid;
         //list dynaform fields
         if ($table['ADD_TAB_TYPE'] == 'NORMAL' || $table['ADD_TAB_TYPE'] == 'GRID') {
             $repTabPluginPermissions = $this->_getSimpleReportPluginDef();
         }
     }
     $this->includeExtJS('pmTables/' . $jsFile);
     $this->setJSVar('flagProcessmap', isset($_REQUEST['flagProcessmap']) ? $_REQUEST['flagProcessmap'] : 0);
     $this->setJSVar('ADD_TAB_UID', $addTabUid);
     $this->setJSVar('PRO_UID', isset($_GET['PRO_UID']) ? $_GET['PRO_UID'] : false);
     $this->setJSVar('TABLE', $table);
     $this->setJSVar('dbg', isset($httpData->dbg));
     $this->setJSVar('columnsTypes', $columnsTypesList);
     $this->setJSVar('dataNumRows', $dataNumRows);
     $this->setJSVar('_plugin_permissions', $repTabPluginPermissions);
     $this->setJSVar('sizeTableName', $this->getSizeTableName());
     $isBpmn = 0;
     if (isset($_GET['PRO_UID'])) {
         $process = new Process();
         $isBpmn = $process->isBpmnProcess($_GET['PRO_UID']);
     }
     $this->setJSVar('isBpmn', $isBpmn);
     G::RenderPage('publish', 'extJs');
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:56,代码来源:pmTables.php


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