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


PHP Process::getAllProcesses方法代码示例

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


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

示例1: index

 /**
  * getting default list
  *
  * @param string $httpData (opional)
  */
 public function index($httpData)
 {
     if ($this->userUxType == 'SINGLE') {
         $this->indexSingle($httpData);
         return;
     }
     require_once 'classes/model/UsersProperties.php';
     G::LoadClass('process');
     G::LoadClass('case');
     $userProperty = new UsersProperties();
     $process = new Process();
     $case = new Cases();
     G::loadClass('system');
     $sysConf = System::getSystemConfiguration(PATH_CONFIG . 'env.ini');
     //Get ProcessStatistics Info
     $start = 0;
     $limit = '';
     $proData = $process->getAllProcesses($start, $limit);
     $processList = $case->getStartCasesPerType($_SESSION['USER_LOGGED'], 'category');
     $switchLink = $userProperty->getUserLocation($_SESSION['USER_LOGGED']);
     if (!isset($_COOKIE['workspaceSkin'])) {
         if (substr($sysConf['default_skin'], 0, 2) == 'ux') {
             $_SESSION['_defaultUserLocation'] = $switchLink;
             $switchLink = '/sys' . SYS_SYS . '/' . SYS_LANG . '/' . $sysConf['default_skin'] . '/main';
         }
     }
     unset($processList[0]);
     //Get simplified options
     global $G_TMP_MENU;
     $mnu = new Menu();
     $mnu->load('simplified');
     $arrayMnuOption = array();
     $mnuNewCase = array();
     if (!empty($mnu->Options)) {
         foreach ($mnu->Options as $index => $value) {
             $option = array('id' => $mnu->Id[$index], 'url' => $mnu->Options[$index], 'label' => $mnu->Labels[$index], 'icon' => $mnu->Icons[$index], 'class' => $mnu->ElementClass[$index]);
             if ($mnu->Id[$index] != 'S_NEW_CASE') {
                 $arrayMnuOption[] = $option;
             } else {
                 $mnuNewCase = $option;
             }
         }
     }
     $this->setView($this->userUxBaseTemplate . PATH_SEP . 'index');
     $this->setVar('usrUid', $this->userID);
     $this->setVar('userName', $this->userName);
     $this->setVar('processList', $processList);
     $this->setVar('canStartCase', $case->canStartCase($_SESSION['USER_LOGGED']));
     $this->setVar('userUxType', $this->userUxType);
     $this->setVar('clientBrowser', $this->clientBrowser['name']);
     $this->setVar('switchLink', $switchLink);
     $this->setVar('arrayMnuOption', $arrayMnuOption);
     $this->setVar('mnuNewCase', $mnuNewCase);
     $this->render();
 }
开发者ID:ralpheav,项目名称:processmaker,代码行数:60,代码来源:home.php

示例2: getProcessList

function getProcessList()
{
    G::LoadClass('case');
    G::LoadClass('process');
    G::LoadClass('calendar');
    $calendar = new Calendar();
    $oProcess = new Process();
    $oCase = new Cases();
    //Get ProcessStatistics Info
    $start = 0;
    $limit = '';
    $proData = $oProcess->getAllProcesses($start, $limit, null, null, false, true);
    $bCanStart = $oCase->canStartCase($_SESSION['USER_LOGGED']);
    if ($bCanStart) {
        $processListInitial = $oCase->getStartCasesPerType($_SESSION['USER_LOGGED'], 'category');
        $processList = array();
        foreach ($processListInitial as $key => $procInfo) {
            if (isset($procInfo['pro_uid'])) {
                if (trim($procInfo['cat']) == "") {
                    $procInfo['cat'] = "_OTHER_";
                }
                $processList[$procInfo['catname']][$procInfo['value']] = $procInfo;
            }
        }
        ksort($processList);
        foreach ($processList as $key => $processInfo) {
            ksort($processList[$key]);
        }
        if (!isset($_REQUEST['node'])) {
            $node = 'root';
        } else {
            $node = $_REQUEST['node'];
        }
        foreach ($proData as $key => $proInfo) {
            $proData[$proInfo['PRO_UID']] = $proInfo;
        }
        $processListTree = array();
        if (1) {
            foreach ($processList as $key => $processInfo) {
                $tempTree['text'] = $key;
                $tempTree['id'] = G::encryptOld($key);
                $tempTree['cls'] = 'folder';
                $tempTree['draggable'] = true;
                $tempTree['optionType'] = "category";
                //$tempTree['allowDrop']=false;
                $tempTree['singleClickExpand'] = true;
                if ($key != "No Category") {
                    $tempTree['expanded'] = true;
                } else {
                    //$tempTree ['expanded'] = false;
                    $tempTree['expanded'] = true;
                }
                $tempTreeChildren = array();
                foreach ($processList[$key] as $keyChild => $processInfoChild) {
                    //print_r($processInfo);
                    $tempTreeChild['text'] = htmlentities($keyChild, ENT_QUOTES, 'UTF-8');
                    //ellipsis ( $keyChild, 50 );
                    //$tempTree['text']=$key;
                    $tempTreeChild['id'] = G::encryptOld($keyChild);
                    $tempTreeChild['draggable'] = true;
                    $tempTreeChild['leaf'] = true;
                    $tempTreeChild['icon'] = '/images/icon.trigger.png';
                    $tempTreeChild['allowChildren'] = false;
                    $tempTreeChild['optionType'] = "startProcess";
                    $tempTreeChild['pro_uid'] = $processInfoChild['pro_uid'];
                    $tempTreeChild['tas_uid'] = $processInfoChild['uid'];
                    $processInfoChild['myInbox'] = 0;
                    $processInfoChild['totalInbox'] = 0;
                    if (isset($proData[$processInfoChild['pro_uid']])) {
                        $tempTreeChild['otherAttributes'] = array_merge($processInfoChild, $proData[$processInfoChild['pro_uid']], $calendar->getCalendarFor($_SESSION['USER_LOGGED'], $processInfoChild['pro_uid'], $processInfoChild['uid']));
                        $tempTreeChild['otherAttributes']['PRO_TAS_TITLE'] = str_replace(")", "", str_replace("(", "", trim(str_replace($tempTreeChild['otherAttributes']['PRO_TITLE'], "", $tempTreeChild['otherAttributes']["value"]))));
                        $tempTreeChild['qtip'] = $tempTreeChild['otherAttributes']['PRO_DESCRIPTION'];
                        //$tempTree['cls']='file';
                        $tempTreeChildren[] = $tempTreeChild;
                    }
                }
                $tempTree['children'] = $tempTreeChildren;
                $processListTree[] = $tempTree;
            }
        } else {
            foreach ($processList[$node] as $key => $processInfo) {
                //print_r($processInfo);
                $tempTree['text'] = $key;
                //ellipsis ( $key, 50 );
                //$tempTree['text']=$key;
                $tempTree['id'] = $key;
                $tempTree['draggable'] = true;
                $tempTree['leaf'] = true;
                $tempTree['icon'] = '/images/icon.trigger.png';
                $tempTree['allowChildren'] = false;
                $tempTree['optionType'] = "startProcess";
                $tempTree['pro_uid'] = $processInfo['pro_uid'];
                $tempTree['tas_uid'] = $processInfo['uid'];
                $processInfo['myInbox'] = 0;
                $processInfo['totalInbox'] = 0;
                $tempTree['otherAttributes'] = array_merge($processInfo, $proData[$processInfo['pro_uid']], $calendar->getCalendarFor($processInfo['uid'], $processInfo['uid'], $processInfo['uid']));
                $tempTree['otherAttributes']['PRO_TAS_TITLE'] = str_replace(")", "", str_replace("(", "", trim(str_replace($tempTree['otherAttributes']['PRO_TITLE'], "", $tempTree['otherAttributes']["value"]))));
                $tempTree['qtip'] = $tempTree['otherAttributes']['PRO_DESCRIPTION'];
                //$tempTree['cls']='file';
                $processListTree[] = $tempTree;
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:casesStartPage_Ajax.php

示例3: isset

 */
require_once 'classes/model/Process.php';
$start = isset($_POST['start']) ? $_POST['start'] : 0;
$limit = isset($_POST['limit']) ? $_POST['limit'] : '';
$dir = isset($_POST['dir']) ? $_POST['dir'] : 'ASC';
$sort = isset($_POST['sort']) ? $_POST['sort'] : '';
$oProcess = new Process();
$oProcess->dir = $dir;
$oProcess->sort = $sort;
//$memcache = & PMmemcached::getSingleton( SYS_SYS );
$memkey = 'no memcache';
$memcacheUsed = 'not used';
$totalCount = 0;
if (isset($_POST['category']) && $_POST['category'] !== '<reset>') {
    if (isset($_POST['processName'])) {
        $proData = $oProcess->getAllProcesses($start, $limit, $_POST['category'], $_POST['processName']);
    } else {
        $proData = $oProcess->getAllProcesses($start, $limit, $_POST['category']);
    }
} else {
    if (isset($_POST['processName'])) {
        $memkey = 'processList-' . $start . '-' . $limit . '-' . $_POST['processName'];
        $memcacheUsed = 'yes';
        $proData = $memcache->get($memkey);
        if ($proData === false) {
            $proData = $oProcess->getAllProcesses($start, $limit, null, $_POST['processName']);
            $memcache->set($memkey, $proData, PMmemcached::ONE_HOUR);
            $totalCount = count($proData);
            $proData = array_splice($proData, $start, $limit);
            $memcacheUsed = 'no';
        } else {
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:processesList.php

示例4: isset

 */
require_once 'classes/model/Process.php';
$start = isset($_POST['start']) ? $_POST['start'] : 0;
$limit = isset($_POST['limit']) ? $_POST['limit'] : '';
$dir = isset($_POST['dir']) ? $_POST['dir'] : 'ASC';
$sort = isset($_POST['sort']) ? $_POST['sort'] : '';
$oProcess = new Process();
$oProcess->dir = $dir;
$oProcess->sort = $sort;
//$memcache = & PMmemcached::getSingleton( SYS_SYS );
$memkey = 'no memcache';
$memcacheUsed = 'not used';
$totalCount = 0;
if (isset($_POST['category']) && $_POST['category'] !== '<reset>') {
    if (isset($_POST['processName'])) {
        $proData = $oProcess->getAllProcesses($start, $limit, $_POST['category'], $_POST['processName'], true, false, $_SESSION["USER_LOGGED"]);
    } else {
        $proData = $oProcess->getAllProcesses($start, $limit, $_POST['category'], null, true, false, $_SESSION["USER_LOGGED"]);
    }
} else {
    if (isset($_POST['processName'])) {
        $memkey = 'processList-' . $start . '-' . $limit . '-' . $_POST['processName'];
        $memcacheUsed = 'yes';
        $proData = $memcache->get($memkey);
        if ($proData === false) {
            $proData = $oProcess->getAllProcesses($start, $limit, null, $_POST['processName'], true, false, $_SESSION["USER_LOGGED"]);
            $memcache->set($memkey, $proData, PMmemcached::ONE_HOUR);
            $totalCount = count($proData);
            $proData = array_splice($proData, $start, $limit);
            $memcacheUsed = 'no';
        } else {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processesList.php


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