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


PHP Cases::sendNotifications方法代码示例

本文整理汇总了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
开发者ID:nhenderson,项目名称:processmaker,代码行数:67,代码来源:class.wsBase.php

示例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

                        }

                    }

                }

            }

        }

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:class.derivation.php

示例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)) {
开发者ID:ralpheav,项目名称:processmaker,代码行数:31,代码来源:cases_Derivate.php


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