本文整理汇总了PHP中Cases::unserializeData方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::unserializeData方法的具体用法?PHP Cases::unserializeData怎么用?PHP Cases::unserializeData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::unserializeData方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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->addSelectColumn(ApplicationPeer::APP_DATA);
$c2->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
$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->unserializeData($row2['APP_DATA']);
if (isset($caseData[$tasGroupVariable])) {
if (trim($caseData[$tasGroupVariable]) != '') {
if (in_array(trim($caseData[$tasGroupVariable]), $aGroups)) {
$cases[] = $row2['APP_UID'];
}
}
}
$rs2->next();
}
$rs->next();
}
}
return $cases;
}
示例2: generateData
/**
* Generate data
*
* return void
*/
public function generateData()
{
try {
G::LoadClass("case");
AppAssignSelfServiceValuePeer::doDeleteAll(); //Delete all records
//Generate data
$case = new Cases();
$criteria = new Criteria("workflow");
$criteria->addSelectColumn(AppDelegationPeer::APP_UID);
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
$criteria->addSelectColumn(ApplicationPeer::APP_DATA);
$criteria->addSelectColumn(AppDelegationPeer::PRO_UID);
$criteria->addSelectColumn(TaskPeer::TAS_UID);
$criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
$criteria->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
$criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_ASSIGN_TYPE, "SELF_SERVICE", Criteria::EQUAL);
$criteria->add(TaskPeer::TAS_GROUP_VARIABLE, "", Criteria::NOT_EQUAL);
$criteria->add(AppDelegationPeer::USR_UID, "", Criteria::EQUAL);
$criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN", Criteria::EQUAL);
$rsCriteria = AppDelegationPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$applicationData = $case->unserializeData($row["APP_DATA"]);
$taskGroupVariable = trim($row["TAS_GROUP_VARIABLE"], " @#");
if ($taskGroupVariable != "" && isset($applicationData[$taskGroupVariable]) && trim($applicationData[$taskGroupVariable]) != "") {
$this->create($row["APP_UID"], $row["DEL_INDEX"], array("PRO_UID" => $row["PRO_UID"], "TAS_UID" => $row["TAS_UID"], "GRP_UID" => trim($applicationData[$taskGroupVariable])));
}
}
} catch (Exception $e) {
throw $e;
}
}
示例3: generateData
/**
* Generate Data
*
* @return object criteria
*/
public function generateData($appUid, $delPreviusUsrUid)
{
try {
G::LoadClass("case");
//Generate data
$case = new Cases();
$criteria = new Criteria("workflow");
$criteria->addSelectColumn(AppDelegationPeer::APP_UID);
$criteria->addSelectColumn(AppDelegationPeer::DEL_INDEX);
$criteria->addSelectColumn(ApplicationPeer::APP_DATA);
$criteria->addSelectColumn(AppDelegationPeer::PRO_UID);
$criteria->addSelectColumn(AppDelegationPeer::DEL_TASK_DUE_DATE);
$criteria->addSelectColumn(TaskPeer::TAS_UID);
$criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
$criteria->addJoin(AppDelegationPeer::APP_UID, ApplicationPeer::APP_UID, Criteria::LEFT_JOIN);
$criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(TaskPeer::TAS_ASSIGN_TYPE, "SELF_SERVICE", Criteria::EQUAL);
//$criteria->add(TaskPeer::TAS_GROUP_VARIABLE, "", Criteria::NOT_EQUAL);
$criteria->add(AppDelegationPeer::USR_UID, "", Criteria::EQUAL);
$criteria->add(AppDelegationPeer::DEL_THREAD_STATUS, "OPEN", Criteria::EQUAL);
$criteria->add(AppDelegationPeer::APP_UID, $appUid, Criteria::EQUAL);
$rsCriteria = AppDelegationPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$applicationData = $case->unserializeData($row["APP_DATA"]);
$taskGroupVariable = trim($row["TAS_GROUP_VARIABLE"], " @#");
$delPreviusUsrUid = '';
$unaUid = $this->newRow($row, $delPreviusUsrUid);
//Selfservice by group
if ($taskGroupVariable != "" && isset($applicationData[$taskGroupVariable]) && trim($applicationData[$taskGroupVariable]) != "") {
$gprUid = trim($applicationData[$taskGroupVariable]);
//Define Users by Group
$gpr = new GroupUser();
$arrayUsers = $gpr->getAllGroupUser($gprUid);
foreach ($arrayUsers as $urow) {
$newRow["USR_UID"] = $urow["USR_UID"];
$listUnassignedGpr = new ListUnassignedGroup();
$listUnassignedGpr->newRow($unaUid, $urow["USR_UID"], "GROUP", $gprUid);
}
} else {
//Define all users assigned to Task
$task = new TaskUser();
$arrayUsers = $task->getAllUsersTask($row["TAS_UID"]);
foreach ($arrayUsers as $urow) {
$newRow["USR_UID"] = $urow["USR_UID"];
$listUnassignedGpr = new ListUnassignedGroup();
$listUnassignedGpr->newRow($unaUid, $urow["USR_UID"], "USER", "");
}
}
}
} catch (Exception $e) {
throw $e;
}
}