本文整理汇总了PHP中Cases::removeCase方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::removeCase方法的具体用法?PHP Cases::removeCase怎么用?PHP Cases::removeCase使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::removeCase方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteCase
function deleteCase($params)
{
$ainfoCase = array();
try {
$applicationUID = isset($_POST['APP_UID']) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
$app = new Application();
$caseData = $app->load($applicationUID);
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
$oCase = new Cases();
$oCase->removeCase($applicationUID);
$this->success = true;
$this->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
} catch (Exception $e) {
$this->success = false;
$this->msg = $e->getMessage();
}
}
示例2: isset
} else {
$APP_UID = $_SESSION['APPLICATION'];
$DEL_INDEX = $_SESSION['INDEX'];
}
$oCase->pauseCase($APP_UID, $DEL_INDEX, $_SESSION['USER_LOGGED'], $unpauseDate);
break;
case 'unpauseCase':
$sApplicationUID = isset($_POST['sApplicationUID']) ? $_POST['sApplicationUID'] : $_SESSION['APPLICATION'];
$iIndex = isset($_POST['sApplicationUID']) ? $_POST['iIndex'] : $_SESSION['INDEX'];
$oCase = new Cases();
$oCase->unpauseCase($sApplicationUID, $iIndex, $_SESSION['USER_LOGGED']);
break;
case 'deleteCase':
$oCase = new Cases();
$sApplicationUID = isset($_POST['sApplicationUID']) ? $_POST['sApplicationUID'] : $_SESSION['APPLICATION'];
$oCase->removeCase($sApplicationUID);
break;
case 'view_reassignCase':
G::LoadClass('groups');
G::LoadClass('tasks');
$oTasks = new Tasks();
$aAux = $oTasks->getGroupsOfTask($_SESSION['TASK'], 1);
$row = array();
$groups = new Groups();
foreach ($aAux as $aGroup) {
$aUsers = $groups->getUsersOfGroup($aGroup['GRP_UID']);
foreach ($aUsers as $aUser) {
if ($aUser['USR_UID'] != $_SESSION['USER_LOGGED']) {
$row[] = $aUser['USR_UID'];
}
}
示例3: deleteCase
/**
* Delete case
*
* @param string caseUid : ID of the case.
* @return $result will return an object
*/
public function deleteCase ($caseUid)
{
$g = new G();
try {
$g->sessionVarSave();
$_SESSION["APPLICATION"] = $caseUid;
if (empty( $caseUid )) {
$result = new wsResponse( 100, G::LoadTranslation( "ID_REQUIRED_FIELD" ) . " caseUid" );
$g->sessionVarRestore();
return $result;
}
$case = new Cases();
$case->removeCase( $caseUid );
//Response
$res = new wsResponse( 0, G::LoadTranslation( "ID_COMMAND_EXECUTED_SUCCESSFULLY" ) );
$result = array ("status_code" => $res->status_code,"message" => $res->message,"timestamp" => $res->timestamp
);
$g->sessionVarRestore();
return $result;
} catch (Exception $e) {
$result = new wsResponse(100, $e->getMessage());
$g->sessionVarRestore();
return $result;
}
}
示例4: deleteCase
public function deleteCase()
{
try {
$applicationUID = isset($_POST['APP_UID']) ? $_POST['APP_UID'] : $_SESSION['APPLICATION'];
$app = new Application();
$caseData = $app->load($applicationUID);
$data['APP_NUMBER'] = $caseData['APP_NUMBER'];
$oCase = new Cases();
$oCase->removeCase($applicationUID);
$result->success = true;
$result->msg = G::LoadTranslation('ID_CASE_DELETED_SUCCESSFULLY', SYS_LANG, $data);
} catch (Exception $e) {
$result->success = false;
$result->msg = $e->getMessage();
}
print G::json_encode($result);
}
示例5: deleteProcess
public function deleteProcess($sProcessUID)
{
try {
G::LoadClass('case');
G::LoadClass('reportTables');
//Instance all classes necesaries
$oProcess = new Process();
$oDynaform = new Dynaform();
$oInputDocument = new InputDocument();
$oOutputDocument = new OutputDocument();
$oTrigger = new Triggers();
$oRoute = new Route();
$oGateway = new Gateway();
$oEvent = new Event();
$oSwimlaneElement = new SwimlanesElements();
$oConfiguration = new Configuration();
$oDbSource = new DbSource();
$oReportTable = new ReportTables();
$oCaseTracker = new CaseTracker();
$oCaseTrackerObject = new CaseTrackerObject();
//Delete the applications of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(ApplicationPeer::PRO_UID, $sProcessUID);
$oDataset = ApplicationPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$oCase = new Cases();
while ($aRow = $oDataset->getRow()) {
$oCase->removeCase($aRow['APP_UID']);
$oDataset->next();
}
//Delete the tasks of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(TaskPeer::PRO_UID, $sProcessUID);
$oDataset = TaskPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$this->deleteTask($aRow['TAS_UID']);
$oDataset->next();
}
//Delete the dynaforms of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(DynaformPeer::PRO_UID, $sProcessUID);
$oDataset = DynaformPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oDynaform->remove($aRow['DYN_UID']);
$oDataset->next();
}
//Delete the input documents of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
$oDataset = InputDocumentPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oInputDocument->remove($aRow['INP_DOC_UID']);
$oDataset->next();
}
//Delete the output documents of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(OutputDocumentPeer::PRO_UID, $sProcessUID);
$oDataset = OutputDocumentPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oOutputDocument->remove($aRow['OUT_DOC_UID']);
$oDataset->next();
}
//Delete the triggers of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(TriggersPeer::PRO_UID, $sProcessUID);
$oDataset = TriggersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oTrigger->remove($aRow['TRI_UID']);
$oDataset->next();
}
//Delete the routes of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(RoutePeer::PRO_UID, $sProcessUID);
$oDataset = RoutePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oRoute->remove($aRow['ROU_UID']);
$oDataset->next();
}
//Delete the gateways of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(GatewayPeer::PRO_UID, $sProcessUID);
$oDataset = GatewayPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oGateway->remove($aRow['GAT_UID']);
$oDataset->next();
//.........这里部分代码省略.........
示例6: deleteProcess
public function deleteProcess($sProcessUID, $flagRemoveCases = true)
{
try {
//G::LoadClass('case');
//G::LoadClass('reportTables');
//Instance all classes necesaries
$oProcess = new \Process();
$oDynaform = new \Dynaform();
$oInputDocument = new \InputDocument();
$oOutputDocument = new \OutputDocument();
$oTrigger = new \Triggers();
$oRoute = new \Route();
$oGateway = new \Gateway();
$oEvent = new \Event();
$oSwimlaneElement = new \SwimlanesElements();
$oConfiguration = new \Configuration();
$oDbSource = new \DbSource();
$oReportTable = new \ReportTables();
$oCaseTracker = new \CaseTracker();
$oCaseTrackerObject = new \CaseTrackerObject();
//Update PROCESS_FILES_CHECKED
$configuration = \ConfigurationPeer::retrieveByPK("PROCESS_FILES_CHECKED", "", "", "", "");
if (!is_null($configuration)) {
$arrayProjectUid = unserialize($configuration->getCfgValue());
unset($arrayProjectUid[$sProcessUID]);
$conf = new \Configuration();
$result = $conf->update(array("CFG_UID" => "PROCESS_FILES_CHECKED", "OBJ_UID" => "", "CFG_VALUE" => serialize($arrayProjectUid), "PRO_UID" => "", "USR_UID" => "", "APP_UID" => ""));
}
//Delete the applications of process
if ($flagRemoveCases) {
$case = new \Cases();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ApplicationPeer::APP_UID);
$criteria->add(\ApplicationPeer::PRO_UID, $sProcessUID, \Criteria::EQUAL);
$rsCriteria = \ApplicationPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$result = $case->removeCase($row["APP_UID"]);
}
}
//Delete the tasks of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(\TaskPeer::PRO_UID, $sProcessUID);
$oDataset = \TaskPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
//$this->deleteTask($aRow['TAS_UID']);
$oTasks = new \Tasks();
$oTasks->deleteTask($aRow['TAS_UID']);
$oDataset->next();
}
//Delete the dynaforms of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(\DynaformPeer::PRO_UID, $sProcessUID);
$oDataset = \DynaformPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oDynaform->remove($aRow['DYN_UID']);
$oDataset->next();
}
//Delete the input documents of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(\InputDocumentPeer::PRO_UID, $sProcessUID);
$oDataset = \InputDocumentPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oInputDocument->remove($aRow['INP_DOC_UID']);
$oDataset->next();
}
//Delete the output documents of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(\OutputDocumentPeer::PRO_UID, $sProcessUID);
$oDataset = \OutputDocumentPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oOutputDocument->remove($aRow['OUT_DOC_UID']);
$oDataset->next();
}
//Delete the triggers of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(\TriggersPeer::PRO_UID, $sProcessUID);
$oDataset = \TriggersPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oTrigger->remove($aRow['TRI_UID']);
$oDataset->next();
}
//Delete the routes of process
$oCriteria = new Criteria('workflow');
$oCriteria->add(\RoutePeer::PRO_UID, $sProcessUID);
$oDataset = \RoutePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
//.........这里部分代码省略.........
示例7: Cases
switch ($RBAC->userCanAccess('PM_CASES')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die;
break;
}
/* Includes */
G::LoadClass('case');
/* Process the info */
try {
$oCase = new Cases();
if (isset($_POST['APP_UIDS'])) {
$ids = explode(',', $_POST['APP_UIDS']);
foreach ($ids as $id) {
$oCase->removeCase($id);
}
if (count($_POST['APP_UIDS']) > 1) {
echo 'The Case was deleted successfully';
} else {
echo 'All Cases were deleted successfully';
}
}
} catch (Exception $e) {
echo $e->getMessage();
}