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


PHP AppDelegationPeer::doSelectOne方法代码示例

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


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

示例1: getCurrentDelegation

    public function getCurrentDelegation($sApplicationUID = '', $sUserUID = '')

    {

        $oCriteria = new Criteria();

        $oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);

        $oCriteria->add(AppDelegationPeer::USR_UID, $sUserUID);

        $oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');

        $oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE);

        $oApplication = AppDelegationPeer::doSelectOne($oCriteria);

        if (!is_null($oApplication)) {

            return $oApplication->getDelIndex();

        }



        //if the user is not in the task, we need to return a valid del index, so we are returning the latest delindex

        $oCriteria = new Criteria();

        $oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);

        $oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE);

        $oApplication = AppDelegationPeer::doSelectOne($oCriteria);

        if (!is_null($oApplication)) {

            return $oApplication->getDelIndex();

        }

        throw ( new Exception('this case has 0 delegations') );

    }
开发者ID:nhenderson,项目名称:processmaker,代码行数:43,代码来源:class.case.php

示例2: getValidateSelfService

 public function getValidateSelfService($data)
 {
     $paused = false;
     $data = array_change_key_case($data, CASE_LOWER);
     $sTaskUID = $data['act_uid'];
     $caseType = isset($data['case_type']) ? $data['case_type'] == 'assigned' ? $data['case_type'] : 'unassigned' : 'unassigned';
     $response = new \stdclass();
     $oCriteria = new \Criteria();
     $arrayCondition = array();
     $arrayCondition[] = array(\AppDelegationPeer::APP_UID, \AppDelayPeer::APP_UID);
     $arrayCondition[] = array(\AppDelegationPeer::DEL_INDEX, \AppDelayPeer::APP_DEL_INDEX);
     $oCriteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
     $oCriteria->add(\AppDelegationPeer::TAS_UID, $sTaskUID);
     $oCriteria->add(\AppDelayPeer::APP_DISABLE_ACTION_USER, "0");
     $oResult = \AppDelegationPeer::doSelectOne($oCriteria);
     if (!empty($oResult)) {
         $paused = true;
     }
     $response->paused = $paused;
     $oCriteria = new \Criteria();
     $oCriteria->add(\AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
     $oCriteria->add(\AppDelegationPeer::TAS_UID, $sTaskUID);
     if ($caseType == 'unassigned') {
         $oCriteria->add(\AppDelegationPeer::USR_UID, "", \Criteria::EQUAL);
     }
     $oApplication = \AppDelegationPeer::doSelectOne($oCriteria);
     $response->result = true;
     if (!empty($oApplication) || $paused) {
         $response->result = false;
         $response->message = G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES');
     }
     return $response;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:33,代码来源:Task.php

示例3: validateAssignType

 public function validateAssignType($newValues, $oldValues)
 {
     if (isset($newValues['TAS_ASSIGN_TYPE']) && isset($oldValues['TAS_ASSIGN_TYPE'])) {
         $newAssigType = $newValues['TAS_ASSIGN_TYPE'];
         $oldAssigType = $oldValues['TAS_ASSIGN_TYPE'];
         if ($newAssigType == 'SELF_SERVICE') {
             $newAssigType = isset($newValues['TAS_GROUP_VARIABLE']) ? empty($newValues['TAS_GROUP_VARIABLE']) ? 'SELF_SERVICE' : 'SELF_SERVICE_VALUE_BASED' : 'SELF_SERVICE';
         }
         if ($oldAssigType == 'SELF_SERVICE') {
             $oldAssigType = isset($oldValues['TAS_GROUP_VARIABLE']) ? empty($oldValues['TAS_GROUP_VARIABLE']) ? 'SELF_SERVICE' : 'SELF_SERVICE_VALUE_BASED' : 'SELF_SERVICE';
         }
         if ($oldAssigType == 'SELF_SERVICE' && $newAssigType != 'SELF_SERVICE' || $oldAssigType == 'SELF_SERVICE_VALUE_BASED' && $newAssigType != 'SELF_SERVICE_VALUE_BASED') {
             $oCriteria = new Criteria();
             $oCriteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN");
             $oCriteria->add(AppDelegationPeer::TAS_UID, $newValues['TAS_UID']);
             $oCriteria->add(AppDelegationPeer::USR_UID, "");
             $oApplication = AppDelegationPeer::doSelectOne($oCriteria);
             if (!empty($oApplication)) {
                 throw new Exception(G::LoadTranslation('ID_CURRENT_ASSING_TYPE_WITH_CASES'));
             }
         }
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:23,代码来源:Task.php


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