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


PHP ContentPeer::doSelectRS方法代码示例

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


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

示例1: getActiveLanguages

 public function getActiveLanguages()
 {
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(LanguagePeer::LAN_ID);
     $oCriteria->addSelectColumn(LanguagePeer::LAN_NAME);
     $oCriteria->add(LanguagePeer::LAN_ENABLED, '1');
     $oCriteria->addDescendingOrderByColumn(LanguagePeer::LAN_WEIGHT);
     $oDataset = ContentPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oContent = new Content();
     $rows = array();
     while ($oDataset->next()) {
         array_push($rows, $oDataset->getRow());
     }
     return $rows;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:16,代码来源:Language.php

示例2: mergeExistingGroups

    public function mergeExistingGroups ($sGroupList)

    {

        $oCriteria = new Criteria( 'workflow' );

        $oCriteria->addSelectColumn( GroupwfPeer::GRP_UID );

        $oCriteria->addSelectColumn( ContentPeer::CON_ID );

        $oCriteria->addSelectColumn( ContentPeer::CON_VALUE );

        $oCriteria->add( ContentPeer::CON_CATEGORY, 'GRP_TITLE' );

        $oCriteria->add( ContentPeer::CON_LANG, 'en' );

        $oCriteria->addJoin( ContentPeer::CON_ID, GroupwfPeer::GRP_UID );

        $oDataset = ContentPeer::doSelectRS( $oCriteria );

        $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

        $oDataset->next();

        while ($aRow = $oDataset->getRow()) {

            $aGroupwf[] = $aRow;

            $oDataset->next();

        }

        //check if any group name exists in the dbase

        foreach ($sGroupList as $group) {

            $merged = false;

            foreach ($aGroupwf as $groupBase) {

                if ($groupBase['CON_VALUE'] == $group['GRP_TITLE'] && $groupBase['CON_ID'] != $group['GRP_UID']) {

                    $group['GRP_UID'] = $groupBase['CON_ID'];

                    $mergedGroupList[] = $group;

                    $merged = true;

                }

            }



            if (! $merged) {

                $mergedGroupList[] = $group;

            }

        }



        if (isset( $mergedGroupList )) {

            return $mergedGroupList;

        } else {

            return null;

        }

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

示例3: appTitleByTaskCaseLabelUpdate

 public function appTitleByTaskCaseLabelUpdate($taskUid, $lang, $cron = 0)
 {
     $taskDefTitle = null;
     $criteria = new Criteria("workflow");
     $criteria->addSelectColumn(ContentPeer::CON_VALUE);
     $criteria->add(ContentPeer::CON_CATEGORY, "TAS_DEF_TITLE");
     $criteria->add(ContentPeer::CON_ID, $taskUid);
     $criteria->add(ContentPeer::CON_LANG, $lang);
     $rsCriteria = ContentPeer::doSelectRS($criteria);
     $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     while ($rsCriteria->next()) {
         $row = $rsCriteria->getRow();
         $taskDefTitle = $row["CON_VALUE"];
     }
     //Get cases
     $criteriaAPPCV = new Criteria("workflow");
     $criteriaAPPCV->setDistinct();
     $criteriaAPPCV->addSelectColumn(AppCacheViewPeer::APP_UID);
     $criteriaAPPCV->add(AppCacheViewPeer::DEL_THREAD_STATUS, "OPEN");
     $criteriaAPPCV->add(AppCacheViewPeer::TAS_UID, $taskUid);
     $rsCriteriaAPPCV = AppCacheViewPeer::doSelectRS($criteriaAPPCV);
     $rsCriteriaAPPCV->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     while ($rsCriteriaAPPCV->next()) {
         if ($cron == 1) {
             $arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron")));
             $arrayCron["processcTimeStart"] = time();
             @file_put_contents(PATH_DATA . "cron", serialize($arrayCron));
         }
         $row = $rsCriteriaAPPCV->getRow();
         $appcvAppUid = $row["APP_UID"];
         //Current task?
         $criteria = new Criteria("workflow");
         $criteria->addSelectColumn(AppCacheViewPeer::APP_UID);
         $criteria->add(AppCacheViewPeer::APP_UID, $appcvAppUid);
         $criteria->add(AppCacheViewPeer::DEL_THREAD_STATUS, "OPEN");
         $criteria->add(AppCacheViewPeer::TAS_UID, $taskUid);
         $rsCriteria = AppCacheViewPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         if ($rsCriteria->next()) {
             $appTitle = $taskDefTitle;
             $app = new Application();
             $arrayAppField = $app->Load($appcvAppUid);
             $appTitle = !empty($appTitle) ? $appTitle : "#" . $arrayAppField["APP_NUMBER"];
             $appTitleNew = G::replaceDataField($appTitle, unserialize($arrayAppField["APP_DATA"]));
             if (isset($arrayAppField["APP_TITLE"]) && $arrayAppField["APP_TITLE"] != $appTitleNew) {
                 //Updating the value in content, where...
                 $criteria1 = new Criteria("workflow");
                 $criteria1->add(ContentPeer::CON_CATEGORY, "APP_TITLE");
                 $criteria1->add(ContentPeer::CON_ID, $appcvAppUid);
                 $criteria1->add(ContentPeer::CON_LANG, $lang);
                 //Update set
                 $criteria2 = new Criteria("workflow");
                 $criteria2->add(ContentPeer::CON_VALUE, $appTitleNew);
                 BasePeer::doUpdate($criteria1, $criteria2, Propel::getConnection("workflow"));
             }
         }
     }
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:58,代码来源:AppCacheView.php

示例4: urldecode

    $sPRO_UID = urldecode($_POST['proUid']);
    $oCriteria = new Criteria('workflow');
    $oCriteria->addSelectColumn(DynaformPeer::DYN_UID);
    $oCriteria->add(DynaformPeer::PRO_UID, $sPRO_UID);
    $oDataset = DynaformPeer::doSelectRS($oCriteria);
    $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
    $flag = true;
    while ($oDataset->next() && $flag) {
        $aRow = $oDataset->getRow();
        $oCriteria1 = new Criteria('workflow');
        $oCriteria1->addSelectColumn('COUNT(*) AS DYNAFORMS');
        $oCriteria1->add(ContentPeer::CON_CATEGORY, 'DYN_TITLE');
        $oCriteria1->add(ContentPeer::CON_ID, $aRow['DYN_UID']);
        $oCriteria1->add(ContentPeer::CON_VALUE, $snameDyanform);
        $oCriteria1->add(ContentPeer::CON_LANG, SYS_LANG);
        $oDataset1 = ContentPeer::doSelectRS($oCriteria1);
        $oDataset1->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        $oDataset1->next();
        $aRow1 = $oDataset1->getRow();
        if ($aRow1['DYNAFORMS']) {
            $flag = false;
        }
    }
    print $flag;
} else {
    $dynaform = new dynaform();
    if (isset($_POST['form'])) {
        $aData = $_POST['form'];
        //For old process map form
        if ($aData['DYN_UID'] === '') {
            unset($aData['DYN_UID']);
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:31,代码来源:dynaforms_Save.php

示例5: newRow

 public function newRow($data, $delPreviusUsrUid)
 {
     $data['UNA_UID'] = isset($data['UNA_UID']) ? $data['UNA_UID'] : G::GenerateUniqueId();
     $data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid;
     $data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE'];
     $criteria = new Criteria();
     $criteria->addSelectColumn(ApplicationPeer::APP_NUMBER);
     $criteria->addSelectColumn(ApplicationPeer::APP_UPDATE_DATE);
     $criteria->add(ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL);
     $dataset = ApplicationPeer::doSelectRS($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $aRow = $dataset->getRow();
     $data = array_merge($data, $aRow);
     $criteria = new Criteria();
     $criteria->addSelectColumn(ContentPeer::CON_VALUE);
     $criteria->add(ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL);
     $criteria->add(ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL);
     $criteria->add(ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL);
     $dataset = ContentPeer::doSelectRS($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $aRow = $dataset->getRow();
     $data['APP_TITLE'] = $aRow['CON_VALUE'];
     $criteria = new Criteria();
     $criteria->addSelectColumn(ContentPeer::CON_VALUE);
     $criteria->add(ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL);
     $criteria->add(ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL);
     $criteria->add(ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL);
     $dataset = ContentPeer::doSelectRS($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $aRow = $dataset->getRow();
     $data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];
     $criteria = new Criteria();
     $criteria->addSelectColumn(ContentPeer::CON_VALUE);
     $criteria->add(ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL);
     $criteria->add(ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL);
     $criteria->add(ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL);
     $dataset = ContentPeer::doSelectRS($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $aRow = $dataset->getRow();
     $data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];
     $data['APP_PREVIOUS_USER'] = '';
     if ($data['DEL_PREVIOUS_USR_UID'] != '') {
         $criteria = new Criteria();
         $criteria->addSelectColumn(UsersPeer::USR_USERNAME);
         $criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
         $criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
         $criteria->add(UsersPeer::USR_UID, $data['DEL_PREVIOUS_USR_UID'], Criteria::EQUAL);
         $dataset = UsersPeer::doSelectRS($criteria);
         $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $dataset->next();
         $aRow = $dataset->getRow();
         $data['APP_PREVIOUS_USR_USERNAME'] = $aRow['USR_USERNAME'];
         $data['APP_PREVIOUS_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
         $data['APP_PREVIOUS_USR_LASTNAME'] = $aRow['USR_LASTNAME'];
     }
     self::create($data);
     return $data['UNA_UID'];
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:62,代码来源:ListUnassigned.php

示例6: newRow

    public function newRow ($data, $delPreviusUsrUid, $isInitSubprocess = false, $dataPreviusApplication = array(), $isSelfService = false)
    {
        $removeList = true;
        if (isset($data['REMOVED_LIST'])) {
            $removeList = $data['REMOVED_LIST'];
            unset($data['REMOVED_LIST']);
        }
        $data['DEL_PREVIOUS_USR_UID'] = $delPreviusUsrUid;
        if (isset($data['DEL_TASK_DUE_DATE'])) {
            $data['DEL_DUE_DATE'] = $data['DEL_TASK_DUE_DATE'];
        }

        $criteria = new Criteria();
        $criteria->addSelectColumn( ApplicationPeer::APP_NUMBER );
        $criteria->addSelectColumn( ApplicationPeer::APP_UPDATE_DATE );
        $criteria->add( ApplicationPeer::APP_UID, $data['APP_UID'], Criteria::EQUAL );
        $dataset = ApplicationPeer::doSelectRS($criteria);
        $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        $dataset->next();
        $aRow = $dataset->getRow();
        $data = array_merge($data, $aRow);


        $criteria = new Criteria();
        $criteria->addSelectColumn(ContentPeer::CON_VALUE);
        $criteria->add( ContentPeer::CON_ID, $data['APP_UID'], Criteria::EQUAL );
        $criteria->add( ContentPeer::CON_CATEGORY, 'APP_TITLE', Criteria::EQUAL );
        $criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
        $dataset = ContentPeer::doSelectRS($criteria);
        $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        $dataset->next();
        $aRow = $dataset->getRow();
        $data['APP_TITLE'] = $aRow['CON_VALUE'];


        $criteria = new Criteria();
        $criteria->addSelectColumn(ContentPeer::CON_VALUE);
        $criteria->add( ContentPeer::CON_ID, $data['PRO_UID'], Criteria::EQUAL );
        $criteria->add( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
        $criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
        $dataset = ContentPeer::doSelectRS($criteria);
        $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        $dataset->next();
        $aRow = $dataset->getRow();
        $data['APP_PRO_TITLE'] = $aRow['CON_VALUE'];


        $criteria = new Criteria();
        $criteria->addSelectColumn(ContentPeer::CON_VALUE);
        $criteria->add( ContentPeer::CON_ID, $data['TAS_UID'], Criteria::EQUAL );
        $criteria->add( ContentPeer::CON_CATEGORY, 'TAS_TITLE', Criteria::EQUAL );
        $criteria->add( ContentPeer::CON_LANG, SYS_LANG, Criteria::EQUAL );
        $dataset = ContentPeer::doSelectRS($criteria);
        $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        $dataset->next();
        $aRow = $dataset->getRow();
        $data['APP_TAS_TITLE'] = $aRow['CON_VALUE'];


        $data['APP_PREVIOUS_USER'] = '';
        if ($data['DEL_PREVIOUS_USR_UID'] != '') {
            $criteria = new Criteria();
            $criteria->addSelectColumn(UsersPeer::USR_USERNAME);
            $criteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
            $criteria->addSelectColumn(UsersPeer::USR_LASTNAME);
            $criteria->add( UsersPeer::USR_UID, $data['DEL_PREVIOUS_USR_UID'], Criteria::EQUAL );
            $dataset = UsersPeer::doSelectRS($criteria);
            $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $dataset->next();
            $aRow = $dataset->getRow();
            $data['DEL_PREVIOUS_USR_USERNAME']  = $aRow['USR_USERNAME'];
            $data['DEL_PREVIOUS_USR_FIRSTNAME'] = $aRow['USR_FIRSTNAME'];
            $data['DEL_PREVIOUS_USR_LASTNAME']  = $aRow['USR_LASTNAME'];
        }

        $users = new Users();
        $criteria = new Criteria();
        $criteria->addSelectColumn(SubApplicationPeer::DEL_INDEX_PARENT);
        $criteria->add( SubApplicationPeer::APP_PARENT, $data['APP_UID'], Criteria::EQUAL );
        $dataset = SubApplicationPeer::doSelectRS($criteria);
        $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
        if ($dataset->next()) {
            $aSub = $dataset->getRow();
            if ($aSub['DEL_INDEX_PARENT'] == $data['DEL_PREVIOUS'] && !$isSelfService) {
                $users->refreshTotal($data['USR_UID'], 'add', 'inbox');
                self::create($data, $isSelfService);
                return 1;
            }
        }

        if (!$isInitSubprocess) {
            if ($data['APP_STATUS'] == 'DRAFT') {
                $users->refreshTotal($data['USR_UID'], 'add', 'draft');
            } else {
                $oRow = ApplicationPeer::retrieveByPK($data['APP_UID']);
                $aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
                if ($removeList) {
                    if ($data['DEL_INDEX'] == 2 || $aFields['APP_STATUS'] == 'DRAFT') {
                        $criteria = new Criteria();
                        $criteria->addSelectColumn(SubApplicationPeer::APP_UID);
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:ListInbox.php

示例7: getAllContentsByRole

 function getAllContentsByRole($sys_lang = SYS_LANG)
 {
     if (!isset($sys_lang)) {
         $sys_lang = 'en';
     }
     $oCriteria = new Criteria('workflow');
     $oCriteria->clearSelectColumns();
     $oCriteria->addSelectColumn(ContentPeer::CON_ID);
     $oCriteria->addAsColumn('ROL_NAME', ContentPeer::CON_VALUE);
     //$oCriteria->addAsColumn('ROL_UID', ContentPeer::CON_ID);
     $oCriteria->add(ContentPeer::CON_CATEGORY, 'ROL_NAME');
     $oCriteria->add(ContentPeer::CON_LANG, $sys_lang);
     $oDataset = ContentPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $aRoles = array();
     while ($oDataset->next()) {
         $xRow = $oDataset->getRow();
         $aRoles[$xRow['CON_ID']] = $xRow['ROL_NAME'];
     }
     return $aRoles;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:21,代码来源:Content.php

示例8: getAllProcesses

 public function getAllProcesses($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false, $userLogged = "")
 {
     require_once PATH_RBAC . "model/RbacUsers.php";
     require_once "classes/model/ProcessCategory.php";
     require_once "classes/model/Users.php";
     $user = new RbacUsers();
     $aProcesses = array();
     $categories = array();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(ProcessPeer::PRO_UID);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_PARENT);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_STATUS);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_TYPE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_UPDATE_DATE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_DATE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_USER);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_DEBUG);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_TYPE_PROCESS);
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
     $oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
     $oCriteria->add(ProcessPeer::PRO_UID, '', Criteria::NOT_EQUAL);
     $oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
     if ($reviewSubProcess) {
         $oCriteria->add(ProcessPeer::PRO_SUBPROCESS, '1', Criteria::NOT_EQUAL);
     }
     if (isset($category)) {
         $oCriteria->add(ProcessPeer::PRO_CATEGORY, $category, Criteria::EQUAL);
     }
     $oCriteria->addJoin(ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
     $oCriteria->addJoin(ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN);
     if ($this->sort == "PRO_CREATE_DATE") {
         if ($this->dir == "DESC") {
             $oCriteria->addDescendingOrderByColumn(ProcessPeer::PRO_CREATE_DATE);
         } else {
             $oCriteria->addAscendingOrderByColumn(ProcessPeer::PRO_CREATE_DATE);
         }
     }
     if ($userLogged != "") {
         $oCriteria->add($oCriteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL)->addOr($oCriteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $userLogged, Criteria::EQUAL)));
     }
     $this->tmpCriteria = clone $oCriteria;
     //execute a query to obtain numbers, how many cases there are by process
     if ($counters) {
         $casesCnt = $this->getCasesCountInAllProcesses();
     }
     // getting bpmn projects
     $c = new Criteria('workflow');
     $c->addSelectColumn(BpmnProjectPeer::PRJ_UID);
     $ds = ProcessPeer::doSelectRS($c, Propel::getDbConnection('workflow_ro'));
     $ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $bpmnProjects = array();
     while ($ds->next()) {
         $row = $ds->getRow();
         $bpmnProjects[] = $row['PRJ_UID'];
     }
     //execute the query
     $oDataset = ProcessPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $processes = array();
     $uids = array();
     while ($oDataset->next()) {
         $row = $oDataset->getRow();
         $row["PROJECT_TYPE"] = $row["PRO_TYPE"] == "NORMAL" ? in_array($row["PRO_UID"], $bpmnProjects) ? "bpmn" : "classic" : $row["PRO_TYPE"];
         $processes[] = $row;
         $uids[] = $processes[sizeof($processes) - 1]['PRO_UID'];
     }
     //process details will have the info about the processes
     $processesDetails = array();
     //now get the labels for all process, using an array of Uids,
     $c = new Criteria('workflow');
     //$c->add ( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
     $c->add(ContentPeer::CON_LANG, defined('SYS_LANG') ? SYS_LANG : 'en', Criteria::EQUAL);
     $c->add(ContentPeer::CON_ID, $uids, Criteria::IN);
     $dt = ContentPeer::doSelectRS($c, Propel::getDbConnection('workflow_ro'));
     $dt->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     while ($dt->next()) {
         $row = $dt->getRow();
         $processesDetails[$row['CON_ID']][$row['CON_CATEGORY']] = $row['CON_VALUE'];
     }
     G::loadClass('configuration');
     $oConf = new Configurations();
     $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
     foreach ($processes as $process) {
         $proTitle = isset($processesDetails[$process['PRO_UID']]) && isset($processesDetails[$process['PRO_UID']]['PRO_TITLE']) ? $processesDetails[$process['PRO_UID']]['PRO_TITLE'] : '';
         $proDescription = isset($processesDetails[$process['PRO_UID']]) && isset($processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION']) ? $processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION'] : '';
         $process["PRO_TYPE_PROCESS"] = $process["PRO_TYPE_PROCESS"] == "PUBLIC" ? G::LoadTranslation("ID_PUBLIC") : G::LoadTranslation("ID_PRIVATE");
         // verify if the title is already set on the current language
         if (trim($proTitle) == '') {
             // if not, then load the record to generate content for current language
             $proData = $this->load($process['PRO_UID']);
             $proTitle = $proData['PRO_TITLE'];
             $proDescription = $proData['PRO_DESCRIPTION'];
         }
         //filtering by $processName
         if (isset($processName) && $processName != '' && stripos($proTitle, $processName) === false) {
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Process.php

示例9: getContentFields

 /**
  * Get the [app_description] , [app_title] column values.
  * @return     array of string
  */
 public function getContentFields()
 {
     if ($this->getAppUid() == '') {
         throw new Exception("Error in getContentFields, the APP_UID can't be blank");
     }
     $lang = defined('SYS_LANG') ? SYS_LANG : 'en';
     $c = new Criteria();
     $c->clearSelectColumns();
     $c->addSelectColumn(ContentPeer::CON_CATEGORY);
     $c->addSelectColumn(ContentPeer::CON_LANG);
     $c->addSelectColumn(ContentPeer::CON_VALUE);
     $c->add(ContentPeer::CON_ID, $this->getAppUid());
     //$c->add(ContentPeer::CON_LANG, $lang);
     $c->addAscendingOrderByColumn('CON_CATEGORY');
     $c->addAscendingOrderByColumn('CON_LANG');
     $rs = ContentPeer::doSelectRS($c);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     $content = array();
     while ($row = $rs->getRow()) {
         $conCategory = $row['CON_CATEGORY'];
         $conLang = $row['CON_LANG'];
         if (!isset($content[$conCategory])) {
             $content[$conCategory] = array();
         }
         if (!isset($content[$conCategory][$conLang])) {
             $content[$conCategory][$conLang] = array();
         }
         $content[$conCategory][$conLang] = $row['CON_VALUE'];
         $rs->next();
         $row = $rs->getRow();
     }
     $appTitle = $this->normalizeContent($content, 'APP_TITLE', $lang);
     $appDescription = $this->normalizeContent($content, 'APP_DESCRIPTION', $lang);
     $res['APP_TITLE'] = $appTitle;
     $res['APP_DESCRIPTION'] = $appDescription;
     return $res;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:42,代码来源:Application.php

示例10: copyImport

 /**
  * Copy/Import a DynaForm
  *
  * @param string $processUid Unique id of Process
  * @param array  $arrayData  Data
  *
  * return array Return data of the new DynaForm created
  */
 public function copyImport($processUid, $arrayData)
 {
     try {
         $arrayData = \G::array_change_key_case2($arrayData, CASE_UPPER);
         unset($arrayData["DYN_UID"]);
         unset($arrayData["PMTABLE"]);
         //Verify data
         $process = new \ProcessMaker\BusinessModel\Process();
         $process->throwExceptionIfNotExistsProcess($processUid, $this->arrayFieldNameForException["processUid"]);
         $process->throwExceptionIfDataNotMetFieldDefinition($arrayData, $this->arrayFieldDefinition, $this->arrayFieldNameForException, true);
         if (!isset($arrayData["COPY_IMPORT"])) {
             throw new \Exception(\G::LoadTranslation("ID_UNDEFINED_VALUE_IS_REQUIRED", array($this->getFieldNameByFormatFieldName("COPY_IMPORT"))));
         }
         if (!isset($arrayData["COPY_IMPORT"]["PRJ_UID"])) {
             throw new \Exception(\G::LoadTranslation("ID_UNDEFINED_VALUE_IS_REQUIRED", array($this->getFieldNameByFormatFieldName("COPY_IMPORT.PRJ_UID"))));
         }
         $arrayData["COPY_IMPORT"]["PRJ_UID"] = trim($arrayData["COPY_IMPORT"]["PRJ_UID"]);
         if ($arrayData["COPY_IMPORT"]["PRJ_UID"] == "") {
             throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($this->getFieldNameByFormatFieldName("COPY_IMPORT.PRJ_UID"))));
         }
         if (!isset($arrayData["COPY_IMPORT"]["DYN_UID"])) {
             throw new \Exception(\G::LoadTranslation("ID_UNDEFINED_VALUE_IS_REQUIRED", array($this->getFieldNameByFormatFieldName("COPY_IMPORT.DYN_UID"))));
         }
         $arrayData["COPY_IMPORT"]["DYN_UID"] = trim($arrayData["COPY_IMPORT"]["DYN_UID"]);
         if ($arrayData["COPY_IMPORT"]["DYN_UID"] == "") {
             throw new \Exception(\G::LoadTranslation("ID_INVALID_VALUE_CAN_NOT_BE_EMPTY", array($this->getFieldNameByFormatFieldName("COPY_IMPORT.DYN_UID"))));
         }
         $this->throwExceptionIfExistsTitle($processUid, $arrayData["DYN_TITLE"], $this->arrayFieldNameForException["dynaFormTitle"]);
         //Copy/Import Uids
         $processUidCopyImport = $arrayData["COPY_IMPORT"]["PRJ_UID"];
         $dynaFormUidCopyImport = $arrayData["COPY_IMPORT"]["DYN_UID"];
         //Verify data
         $process->throwExceptionIfNotExistsProcess($processUidCopyImport, $this->getFieldNameByFormatFieldName("COPY_IMPORT.PRJ_UID"));
         $this->throwExceptionIfNotExistsDynaForm($dynaFormUidCopyImport, $processUidCopyImport, $this->getFieldNameByFormatFieldName("COPY_IMPORT.DYN_UID"));
         //Copy/Import
         //Copy content if version is 2
         if ($arrayData["DYN_VERSION"] === 2) {
             $dynaFormOld = new \Dynaform();
             $arrayDynaFormData = $dynaFormOld->Load($dynaFormUidCopyImport);
             $arrayData["DYN_CONTENT"] = $arrayDynaFormData["DYN_CONTENT"];
         }
         //Create
         $arrayData = $this->create($processUid, $arrayData);
         $dynaFormUid = $arrayData[$this->getFieldNameByFormatFieldName("DYN_UID")];
         //Copy files of the DynaForm
         $umaskOld = umask(0);
         $fileXml = PATH_DYNAFORM . $processUidCopyImport . PATH_SEP . $dynaFormUidCopyImport . ".xml";
         if (file_exists($fileXml)) {
             $fileXmlCopy = PATH_DYNAFORM . $processUid . PATH_SEP . $dynaFormUid . ".xml";
             $fhXml = fopen($fileXml, "r");
             $fhXmlCopy = fopen($fileXmlCopy, "w");
             while (!feof($fhXml)) {
                 $strLine = fgets($fhXml, 4096);
                 $strLine = str_replace($processUidCopyImport . "/" . $dynaFormUidCopyImport, $processUid . "/" . $dynaFormUid, $strLine);
                 //DynaForm Grid
                 preg_match_all("/<.*type\\s*=\\s*[\"\\']grid[\"\\'].*xmlgrid\\s*=\\s*[\"\\']\\w{32}\\/(\\w{32})[\"\\'].*\\/>/", $strLine, $arrayMatch, PREG_SET_ORDER);
                 foreach ($arrayMatch as $value) {
                     $dynaFormGridUidCopyImport = $value[1];
                     //Get data
                     $criteria = new \Criteria();
                     $criteria->addSelectColumn(\ContentPeer::CON_VALUE);
                     $criteria->add(\ContentPeer::CON_ID, $dynaFormGridUidCopyImport);
                     $criteria->add(\ContentPeer::CON_CATEGORY, "DYN_TITLE");
                     $criteria->add(\ContentPeer::CON_LANG, SYS_LANG);
                     $rsCriteria = \ContentPeer::doSelectRS($criteria);
                     $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
                     $rsCriteria->next();
                     $row = $rsCriteria->getRow();
                     $dynGrdTitleCopyImport = $row["CON_VALUE"];
                     $criteria = new \Criteria();
                     $criteria->addSelectColumn(\ContentPeer::CON_VALUE);
                     $criteria->add(\ContentPeer::CON_ID, $dynaFormGridUidCopyImport);
                     $criteria->add(\ContentPeer::CON_CATEGORY, "DYN_DESCRIPTION");
                     $criteria->add(\ContentPeer::CON_LANG, SYS_LANG);
                     $rsCriteria = \ContentPeer::doSelectRS($criteria);
                     $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
                     $rsCriteria->next();
                     $row = $rsCriteria->getRow();
                     $dynGrdDescriptionCopyImport = $row["CON_VALUE"];
                     //Create Grid
                     $dynaFormGrid = new \Dynaform();
                     $arrayDataAux = array("PRO_UID" => $processUid, "DYN_TITLE" => $dynGrdTitleCopyImport . ($this->existsTitle($processUid, $dynGrdTitleCopyImport) ? " (" . $arrayData["DYN_TITLE"] . ")" : ""), "DYN_DESCRIPTION" => $dynGrdDescriptionCopyImport, "DYN_TYPE" => "grid");
                     $dynaFormGridUid = $dynaFormGrid->create($arrayDataAux);
                     //Copy files of the DynaForm Grid
                     $fileGridXml = PATH_DYNAFORM . $processUidCopyImport . PATH_SEP . $dynaFormGridUidCopyImport . ".xml";
                     if (file_exists($fileGridXml)) {
                         $fileGridXmlCopy = PATH_DYNAFORM . $processUid . PATH_SEP . $dynaFormGridUid . ".xml";
                         $fhGridXml = fopen($fileGridXml, "r");
                         $fhGridXmlCopy = fopen($fileGridXmlCopy, "w");
                         while (!feof($fhGridXml)) {
                             $strLineAux = fgets($fhGridXml, 4096);
                             $strLineAux = str_replace($processUidCopyImport . "/" . $dynaFormGridUidCopyImport, $processUid . "/" . $dynaFormGridUid, $strLineAux);
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:DynaForm.php

示例11: verifyNameTrigger

 /**
  * Verify name for trigger in process
  * @var string $sProcessUID. Uid for Process
  * @var string $sTriggerName. Name for Trigger
  * @var string $sTriggerUid. Uid for Trigger
  *
  * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
  * @copyright Colosa - Bolivia
  *
  * @return boolean
  */
 public function verifyNameTrigger($sProcessUID, $sTriggerName, $sTriggerUid = '')
 {
     $oCriteria = new \Criteria("workflow");
     $oCriteria->addSelectColumn(\TriggersPeer::TRI_UID);
     $oCriteria->add(\TriggersPeer::PRO_UID, $sProcessUID);
     if ($sTriggerUid != '') {
         $oCriteria->add(\TriggersPeer::TRI_UID, $sTriggerUid, \Criteria::NOT_EQUAL);
     }
     $oDataset = \TriggersPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
     while ($oDataset->next()) {
         $aRow = $oDataset->getRow();
         $oCriteria1 = new \Criteria('workflow');
         $oCriteria1->addSelectColumn('COUNT(*) AS TRIGGERS');
         $oCriteria1->add(\ContentPeer::CON_CATEGORY, 'TRI_TITLE');
         $oCriteria1->add(\ContentPeer::CON_ID, $aRow['TRI_UID']);
         $oCriteria1->add(\ContentPeer::CON_VALUE, $sTriggerName);
         $oCriteria1->add(\ContentPeer::CON_LANG, SYS_LANG);
         $oDataset1 = \ContentPeer::doSelectRS($oCriteria1);
         $oDataset1->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         $oDataset1->next();
         $aRow1 = $oDataset1->getRow();
         if ($aRow1['TRIGGERS']) {
             return false;
         }
     }
     return true;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:39,代码来源:Trigger.php

示例12: update

 public function update($fields)
 {
     require_once "classes/model/AppCacheView.php";
     require_once "classes/model/Configuration.php";
     $con = Propel::getConnection(TaskPeer::DATABASE_NAME);
     try {
         $con->begin();
         $this->load($fields["TAS_UID"]);
         $this->fromArray($fields, BasePeer::TYPE_FIELDNAME);
         if ($this->validate()) {
             $taskDefTitlePrevious = null;
             $criteria = new Criteria("workflow");
             $criteria->addSelectColumn(ContentPeer::CON_VALUE);
             $criteria->add(ContentPeer::CON_CATEGORY, "TAS_DEF_TITLE");
             $criteria->add(ContentPeer::CON_ID, $fields["TAS_UID"]);
             $criteria->add(ContentPeer::CON_LANG, SYS_LANG);
             $rsCriteria = ContentPeer::doSelectRS($criteria);
             $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
             while ($rsCriteria->next()) {
                 $row = $rsCriteria->getRow();
                 $taskDefTitlePrevious = $row["CON_VALUE"];
             }
             $contentResult = 0;
             if (array_key_exists("TAS_TITLE", $fields)) {
                 $contentResult += $this->setTasTitle($fields["TAS_TITLE"]);
             }
             if (array_key_exists("TAS_DESCRIPTION", $fields)) {
                 $contentResult += $this->setTasDescription($fields["TAS_DESCRIPTION"]);
             }
             if (array_key_exists("TAS_DEF_TITLE", $fields)) {
                 $contentResult += $this->setTasDefTitle($fields["TAS_DEF_TITLE"]);
             }
             if (array_key_exists("TAS_DEF_DESCRIPTION", $fields)) {
                 $contentResult += $this->setTasDefDescription($fields["TAS_DEF_DESCRIPTION"]);
             }
             if (array_key_exists("TAS_DEF_PROC_CODE", $fields)) {
                 $contentResult += $this->setTasDefProcCode($fields["TAS_DEF_PROC_CODE"]);
             }
             if (array_key_exists("TAS_DEF_MESSAGE", $fields)) {
                 $contentResult += $this->setTasDefMessage(trim($fields["TAS_DEF_MESSAGE"]));
             }
             if (array_key_exists("TAS_DEF_SUBJECT_MESSAGE", $fields)) {
                 $contentResult += $this->setTasDefSubjectMessage(trim($fields["TAS_DEF_SUBJECT_MESSAGE"]));
             }
             if (array_key_exists("TAS_CALENDAR", $fields)) {
                 $contentResult += $this->setTasCalendar($fields['TAS_UID'], $fields["TAS_CALENDAR"]);
             }
             $result = $this->save();
             $result = $result == 0 ? $contentResult > 0 ? 1 : 0 : $result;
             $con->commit();
             if ($result == 1 && array_key_exists("TAS_DEF_TITLE", $fields) && $fields["TAS_DEF_TITLE"] != $taskDefTitlePrevious) {
                 $criteria = new Criteria("workflow");
                 $criteria->addAsColumn("APPCV_NUM_ROWS", "COUNT(DISTINCT " . AppCacheViewPeer::APP_UID . ")");
                 $criteria->add(AppCacheViewPeer::DEL_THREAD_STATUS, "OPEN");
                 $criteria->add(AppCacheViewPeer::TAS_UID, $fields["TAS_UID"]);
                 $rsCriteria = AppCacheViewPeer::doSelectRS($criteria);
                 $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                 $rsCriteria->next();
                 $row = $rsCriteria->getRow();
                 $appcvNumRows = intval($row["APPCV_NUM_ROWS"]);
                 if ($appcvNumRows <= 1000) {
                     $appcv = new AppCacheView();
                     $appcv->appTitleByTaskCaseLabelUpdate($fields["TAS_UID"], SYS_LANG);
                     $result = 2;
                 } else {
                     //Delete record
                     $criteria = new Criteria("workflow");
                     $criteria->add(ConfigurationPeer::CFG_UID, "TAS_APP_TITLE_UPDATE");
                     $criteria->add(ConfigurationPeer::OBJ_UID, $fields["TAS_UID"]);
                     $criteria->add(ConfigurationPeer::CFG_VALUE, SYS_LANG);
                     $numRowDeleted = ConfigurationPeer::doDelete($criteria);
                     //Insert record
                     $conf = new Configuration();
                     $conf->create(array("CFG_UID" => "TAS_APP_TITLE_UPDATE", "OBJ_UID" => $fields["TAS_UID"], "CFG_VALUE" => SYS_LANG, "PRO_UID" => "", "USR_UID" => "", "APP_UID" => ""));
                     $result = 3;
                 }
             }
             return $result;
         } else {
             $con->rollback();
             throw new Exception("Failed Validation in class " . get_class($this) . ".");
         }
     } catch (Exception $e) {
         $con->rollback();
         throw $e;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:87,代码来源:Task.php

示例13: Criteria

 $criteria = new Criteria();
 $criteria->addSelectColumn(ContentPeer::CON_VALUE);
 $criteria->add(ContentPeer::CON_ID, $copyDynaformGridUid);
 $criteria->add(ContentPeer::CON_CATEGORY, "DYN_TITLE");
 $criteria->add(ContentPeer::CON_LANG, SYS_LANG);
 $rsCriteria = ContentPeer::doSelectRS($criteria);
 $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $rsCriteria->next();
 $row = $rsCriteria->getRow();
 $copyDynGrdTitle = $row["CON_VALUE"];
 $criteria = new Criteria();
 $criteria->addSelectColumn(ContentPeer::CON_VALUE);
 $criteria->add(ContentPeer::CON_ID, $copyDynaformGridUid);
 $criteria->add(ContentPeer::CON_CATEGORY, "DYN_DESCRIPTION");
 $criteria->add(ContentPeer::CON_LANG, SYS_LANG);
 $rsCriteria = ContentPeer::doSelectRS($criteria);
 $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $rsCriteria->next();
 $row = $rsCriteria->getRow();
 $copyDynGrdDescription = $row["CON_VALUE"];
 //Create grid
 $dynaformGrid = new dynaform();
 $aDataAux = $aData;
 $aDataAux["DYN_TYPE"] = "grid";
 $aDataAux["DYN_TITLE"] = $copyDynGrdTitle . ($dynaFormAux->existsTitle($dynaform->getProUid(), $copyDynGrdTitle) ? " (" . $dynaform->getDynTitle() . ")" : "");
 $aDataAux["DYN_DESCRIPTION"] = $copyDynGrdDescription;
 $aFields = $dynaformGrid->create($aDataAux);
 $dynaformGridUid = $dynaformGrid->getDynUid();
 $aDataAux["DYN_UID"] = $dynaformGridUid;
 $dynaformGrid->update($aDataAux);
 //Copy files of the dynaform grid
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:dynaforms_Save.php

示例14: doSelect

 /**
  * Method to do selects.
  *
  * @param      Criteria $criteria The Criteria object used to build the SELECT statement.
  * @param      Connection $con
  * @return     array Array of selected Objects
  * @throws     PropelException Any exceptions caught during processing will be
  *       rethrown wrapped into a PropelException.
  */
 public static function doSelect(Criteria $criteria, $con = null)
 {
     return ContentPeer::populateObjects(ContentPeer::doSelectRS($criteria, $con));
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:13,代码来源:BaseContentPeer.php

示例15: getAllProcesses

 function getAllProcesses($start, $limit, $category = NULL, $processName = NULL)
 {
     require_once PATH_RBAC . "model/RbacUsers.php";
     require_once "classes/model/ProcessCategory.php";
     require_once "classes/model/Users.php";
     $user = new RbacUsers();
     $aProcesses = array();
     $categories = array();
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(ProcessPeer::PRO_UID);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_PARENT);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_STATUS);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CATEGORY);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_DATE);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_CREATE_USER);
     $oCriteria->addSelectColumn(ProcessPeer::PRO_DEBUG);
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
     $oCriteria->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
     $oCriteria->add(ProcessPeer::PRO_UID, '', Criteria::NOT_EQUAL);
     $oCriteria->add(ProcessPeer::PRO_STATUS, 'DISABLED', Criteria::NOT_EQUAL);
     if (isset($category)) {
         $oCriteria->add(ProcessPeer::PRO_CATEGORY, $category, Criteria::EQUAL);
     }
     $oCriteria->addJoin(ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
     $oCriteria->addJoin(ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN);
     $this->tmpCriteria = clone $oCriteria;
     if ($start != '') {
         $oCriteria->setOffset($start);
     }
     if ($limit != '' && !isset($category) && !isset($processName)) {
         $oCriteria->setLimit($limit);
     }
     //execute a query to obtain numbers, how many cases there are by process
     $casesCnt = $this->getCasesCountInAllProcesses();
     //execute the query
     $oDataset = ProcessPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $processes = array();
     $uids = array();
     while ($oDataset->next()) {
         $processes[] = $oDataset->getRow();
         $uids[] = $processes[sizeof($processes) - 1]['PRO_UID'];
     }
     //process details will have the info about the processes
     $processesDetails = array();
     //now get the labels for all process, using an array of Uids,
     $c = new Criteria('workflow');
     //$c->add ( ContentPeer::CON_CATEGORY, 'PRO_TITLE', Criteria::EQUAL );
     $c->add(ContentPeer::CON_LANG, defined('SYS_LANG') ? SYS_LANG : 'en', Criteria::EQUAL);
     $c->add(ContentPeer::CON_ID, $uids, Criteria::IN);
     $dt = ContentPeer::doSelectRS($c);
     $dt->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     while ($dt->next()) {
         $row = $dt->getRow();
         $processesDetails[$row['CON_ID']][$row['CON_CATEGORY']] = $row['CON_VALUE'];
     }
     G::loadClass('configuration');
     $oConf = new Configurations();
     $oConf->loadConfig($obj, 'ENVIRONMENT_SETTINGS', '');
     foreach ($processes as $process) {
         $proTitle = isset($processesDetails[$process['PRO_UID']]) && isset($processesDetails[$process['PRO_UID']]['PRO_TITLE']) ? $processesDetails[$process['PRO_UID']]['PRO_TITLE'] : '';
         $proDescription = isset($processesDetails[$process['PRO_UID']]) && isset($processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION']) ? $processesDetails[$process['PRO_UID']]['PRO_DESCRIPTION'] : '';
         // verify if the title is already set on the current language
         if (trim($proTitle) == '') {
             // if not, then load the record to generate content for current language
             $proData = $this->load($process['PRO_UID']);
             $proTitle = $proData['PRO_TITLE'];
             $proDescription = $proData['PRO_DESCRIPTION'];
         }
         //filtering by $processName
         if (isset($processName) && $processName != '' && stripos($proTitle, $processName) === false) {
             continue;
         }
         $casesCountTotal = 0;
         if (isset($casesCnt[$process['PRO_UID']])) {
             foreach ($casesCnt[$process['PRO_UID']] as $item) {
                 $casesCountTotal += $item;
             }
         }
         //get user format from configuration
         $userOwner = isset($oConf->aConfig['format']) ? $oConf->aConfig['format'] : '';
         $creationDateMask = isset($oConf->aConfig['dateFormat']) ? $oConf->aConfig['dateFormat'] : '';
         if ($userOwner != '') {
             $userOwner = str_replace('@userName', $process['USR_USERNAME'], $userOwner);
             $userOwner = str_replace('@firstName', $process['USR_FIRSTNAME'], $userOwner);
             $userOwner = str_replace('@lastName', $process['USR_LASTNAME'], $userOwner);
             if ($userOwner == " ( )") {
                 $userOwner = '-';
             }
         } else {
             $userOwner = $process['USR_FIRSTNAME'] . ' ' . $process['USR_LASTNAME'];
         }
         //get date format from configuration
         if ($creationDateMask != '') {
             list($date, $time) = explode(' ', $process['PRO_CREATE_DATE']);
             list($y, $m, $d) = explode('-', $date);
//.........这里部分代码省略.........
开发者ID:nshong,项目名称:processmaker,代码行数:101,代码来源:Process.php


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