本文整理汇总了PHP中Cases::sendNotifications方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::sendNotifications方法的具体用法?PHP Cases::sendNotifications怎么用?PHP Cases::sendNotifications使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::sendNotifications方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: derivateCase
//.........这里部分代码省略.........
}
$sFromName = "";
if ($userId != "") {
$user = new Users();
$arrayUserData = $user->load($userId);
if (trim($arrayUserData["USR_EMAIL"]) == "") {
$arrayUserData["USR_EMAIL"] = "info@" . $_SERVER["HTTP_HOST"];
}
$sFromName = "\"" . $arrayUserData["USR_FIRSTNAME"] . " " . $arrayUserData["USR_LASTNAME"] . "\" <" . $arrayUserData["USR_EMAIL"] . ">";
}
$oCase->sendNotifications( $appdel['TAS_UID'], $nextDelegations, $appFields['APP_DATA'], $caseId, $delIndex, $sFromName );
// Send notifications Mobile - Start
try {
$oLight = new \ProcessMaker\BusinessModel\Light();
$nextIndex = $oLight->getInformationDerivatedCase($appFields['APP_UID'], $delIndex);
$notificationMobile = new \ProcessMaker\BusinessModel\Light\NotificationDevice();
$notificationMobile->routeCaseNotification($userId, $_SESSION["PROCESS"], $appdel['TAS_UID'], $appFields, $nextDelegations, $nextIndex);
} catch (Exception $e) {
\G::log(G::loadTranslation( 'ID_NOTIFICATION_ERROR' ) . '|' . $e->getMessage() , PATH_DATA, "mobile.log");
}
// Send notifications Mobile - End
//Save data - Start
//$appFields = $oCase->loadCase($caseId);
//$oCase->updateCase($caseId, $appFields);
//Save data - End
示例2: verifyIsCaseChild
//.........这里部分代码省略.........
) );
//Derive the parent case
$aDeriveTasks = $this->prepareInformation( array ('USER_UID' => - 1,'APP_UID' => $aSA['APP_PARENT'],'DEL_INDEX' => $aSA['DEL_INDEX_PARENT']
) );
if (isset( $aDeriveTasks[1] )) {
if ($aDeriveTasks[1]['ROU_TYPE'] != 'SELECT') {
$nextDelegations2 = array ();
foreach ($aDeriveTasks as $aDeriveTask) {
if (! isset( $aDeriveTask['NEXT_TASK']['USER_ASSIGNED']['USR_UID'] )) {
$selectedUser = $aDeriveTask['NEXT_TASK']['USER_ASSIGNED'][0];
unset( $aDeriveTask['NEXT_TASK']['USER_ASSIGNED'] );
$aDeriveTask['NEXT_TASK']['USER_ASSIGNED'] = $selectedUser;
$myLabels = array ($aDeriveTask['NEXT_TASK']['TAS_TITLE'],$aParentCase['APP_NUMBER'],$selectedUser['USR_USERNAME'],$selectedUser['USR_FIRSTNAME'],$selectedUser['USR_LASTNAME']
);
G::SendTemporalMessage( 'ID_TASK_WAS_ASSIGNED_TO_USER', 'warning', 'labels', 10, null, $myLabels );
}
$nextDelegations2[] = array ('TAS_UID' => $aDeriveTask['NEXT_TASK']['TAS_UID'],'USR_UID' => $aDeriveTask['NEXT_TASK']['USER_ASSIGNED']['USR_UID'],'TAS_ASSIGN_TYPE' => $aDeriveTask['NEXT_TASK']['TAS_ASSIGN_TYPE'],'TAS_DEF_PROC_CODE' => $aDeriveTask['NEXT_TASK']['TAS_DEF_PROC_CODE'],'DEL_PRIORITY' => 3,'TAS_PARENT' => $aDeriveTask['NEXT_TASK']['TAS_PARENT']
);
}
$currentDelegation2 = array ('APP_UID' => $aSA['APP_PARENT'],'DEL_INDEX' => $aSA['DEL_INDEX_PARENT'],'APP_STATUS' => 'TO_DO','TAS_UID' => $aParentCase['TAS_UID'],'ROU_TYPE' => $aDeriveTasks[1]['ROU_TYPE']
);
$this->derivate( $currentDelegation2, $nextDelegations2 );
if($delIndex > 0 ) {
// Send notifications - Start
$oUser = new Users();
$aUser = $oUser->load($appFields["CURRENT_USER_UID"]);
$sFromName = $aUser["USR_FIRSTNAME"] . " " . $aUser["USR_LASTNAME"] . ($aUser["USR_EMAIL"] != "" ? " <" . $aUser["USR_EMAIL"] . ">" : "");
try {
$oCase->sendNotifications($appFields["TAS_UID"],
$nextDelegations2,
$appFields["APP_DATA"],
$sApplicationUID,
$delIndex,
$sFromName);
} catch (Exception $e) {
G::SendTemporalMessage(G::loadTranslation("ID_NOTIFICATION_ERROR") . " - " . $e->getMessage(), "warning", "string", null, "100%");
}
// Send notifications - End
}
}
}
}
}
}
示例3: sizeof
//Execute triggers after derivation
$_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof($triggers);
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = 'AFTER';
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames($triggers);
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_VALUES'] = $triggers;
}
$oCase->updateCase($_SESSION['APPLICATION'], $appFields);
// Send notifications - Start
$oUser = new Users();
$aUser = $oUser->load($_SESSION['USER_LOGGED']);
if (trim($aUser['USR_EMAIL']) == '') {
$aUser['USR_EMAIL'] = 'info@' . $_SERVER['HTTP_HOST'];
}
$sFromName = '"' . $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . '" <' . $aUser['USR_EMAIL'] . '>';
try {
$oCase->sendNotifications($_SESSION['TASK'], $_POST['form']['TASKS'], $appFields['APP_DATA'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $sFromName);
} catch (Exception $e) {
G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR') . ' - ' . $e->getMessage(), 'warning', 'string', null, '100%');
}
// Send notifications - End
// Events - Start
$oEvent = new Event();
$oEvent->closeAppEvents($_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['TASK']);
$oCurrentAppDel = AppDelegationPeer::retrieveByPk($_SESSION['APPLICATION'], $_SESSION['INDEX'] + 1);
$multipleDelegation = false;
// check if there are multiple derivations
if (count($_POST['form']['TASKS']) > 1) {
$multipleDelegation = true;
}
// If the case has been delegated
if (isset($oCurrentAppDel)) {