本文整理汇总了PHP中Cases::LoadCase方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::LoadCase方法的具体用法?PHP Cases::LoadCase怎么用?PHP Cases::LoadCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::LoadCase方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getSelfServiceCasesByEvaluate
public function getSelfServiceCasesByEvaluate($userUid)
{
$cases = array();
//check groups assigned to SelfService task
G::LoadClass('groups');
$group = new Groups();
$aGroups = $group->getActiveGroupsForAnUser($userUid);
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn(TaskPeer::TAS_UID);
$c->addSelectColumn(TaskPeer::PRO_UID);
$c->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
$c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN);
$c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN);
$c->add(ProcessPeer::PRO_STATUS, 'ACTIVE');
$c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE');
$c->add(TaskPeer::TAS_GROUP_VARIABLE, '', Criteria::NOT_EQUAL);
$rs = TaskPeer::doSelectRS($c);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs->next();
if ($rs->getRecordCount() > 0) {
if (!class_exists('Cases')) {
G::loadClass('case');
}
$caseInstance = new Cases();
while ($row = $rs->getRow()) {
$tasGroupVariable = str_replace(array('@', '#'), '', $row['TAS_GROUP_VARIABLE']);
$c2 = new Criteria();
$c2->clearSelectColumns();
$c2->addSelectColumn(AppDelegationPeer::APP_UID);
$c2->add(AppDelegationPeer::TAS_UID, $row['TAS_UID']);
$c2->add(AppDelegationPeer::USR_UID, '');
$c2->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
$rs2 = AppDelegationPeer::doSelectRS($c2);
$rs2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rs2->next();
while ($row2 = $rs2->getRow()) {
$caseData = $caseInstance->LoadCase($row2['APP_UID']);
if (isset($caseData['APP_DATA'][$tasGroupVariable])) {
if (trim($caseData['APP_DATA'][$tasGroupVariable]) != '') {
if (in_array(trim($caseData['APP_DATA'][$tasGroupVariable]), $aGroups)) {
$cases[] = $row2['APP_UID'];
}
}
}
$rs2->next();
}
$rs->next();
}
}
return $cases;
}