NotificationTargetCommonITILObject::getSpecificTargets PHP 메소드

getSpecificTargets() 공개 메소드

Get specifics targets for ITIL objects
public getSpecificTargets ( $data, $options )
$data array
$options array
    function getSpecificTargets($data, $options)
    {
        //Look for all targets whose type is Notification::ITEM_USER
        switch ($data['type']) {
            case Notification::USER_TYPE:
                switch ($data['items_id']) {
                    case Notification::ASSIGN_TECH:
                        $this->getLinkedUserByType(CommonITILActor::ASSIGN);
                        break;
                        //Send to the supervisor of group in charge of the ITIL object
                    //Send to the supervisor of group in charge of the ITIL object
                    case Notification::SUPERVISOR_ASSIGN_GROUP:
                        $this->getLinkedGroupSupervisorByType(CommonITILActor::ASSIGN);
                        break;
                        //Notification to the group in charge of the ITIL object without supervisor
                    //Notification to the group in charge of the ITIL object without supervisor
                    case Notification::ASSIGN_GROUP_WITHOUT_SUPERVISOR:
                        $this->getLinkedGroupWithoutSupervisorByType(CommonITILActor::ASSIGN);
                        break;
                        //Send to the user who's got the issue
                    //Send to the user who's got the issue
                    case Notification::RECIPIENT:
                        $this->getRecipientAddress();
                        break;
                        //Send to the supervisor of the requester's group
                    //Send to the supervisor of the requester's group
                    case Notification::SUPERVISOR_REQUESTER_GROUP:
                        $this->getLinkedGroupSupervisorByType(CommonITILActor::REQUESTER);
                        break;
                        //Send to the technician previously in charge of the ITIL object (before reassignation)
                    //Send to the technician previously in charge of the ITIL object (before reassignation)
                    case Notification::OLD_TECH_IN_CHARGE:
                        $this->getOldAssignTechnicianAddress();
                        break;
                        //Assign to a supplier
                    //Assign to a supplier
                    case Notification::SUPPLIER:
                        $this->getSupplierAddress($this->options['sendprivate']);
                        break;
                    case Notification::REQUESTER_GROUP:
                        $this->getLinkedGroupByType(CommonITILActor::REQUESTER);
                        break;
                        //Notification to the requester group without supervisor
                    //Notification to the requester group without supervisor
                    case Notification::REQUESTER_GROUP_WITHOUT_SUPERVISOR:
                        $this->getLinkedGroupWithoutSupervisorByType(CommonITILActor::REQUESTER);
                        break;
                    case Notification::ASSIGN_GROUP:
                        $this->getLinkedGroupByType(CommonITILActor::ASSIGN);
                        break;
                        //Send to the ITIL object validation approver
                    //Send to the ITIL object validation approver
                    case Notification::VALIDATION_APPROVER:
                        $this->getValidationApproverAddress($options);
                        break;
                        //Send to the ITIL object validation requester
                    //Send to the ITIL object validation requester
                    case Notification::VALIDATION_REQUESTER:
                        $this->getValidationRequesterAddress($options);
                        break;
                        //Send to the ITIL object followup author
                    //Send to the ITIL object followup author
                    case Notification::FOLLOWUP_AUTHOR:
                        $this->getFollowupAuthor($options);
                        break;
                        //Send to the ITIL object followup author
                    //Send to the ITIL object followup author
                    case Notification::TASK_AUTHOR:
                        $this->getTaskAuthor($options);
                        break;
                        //Send to the ITIL object followup author
                    //Send to the ITIL object followup author
                    case Notification::TASK_ASSIGN_TECH:
                        $this->getTaskAssignUser($options);
                        break;
                        //Send to the ITIL object task group assigned
                    //Send to the ITIL object task group assigned
                    case Notification::TASK_ASSIGN_GROUP:
                        $this->getTaskAssignGroup($options);
                        break;
                        //Notification to the ITIL object's observer group
                    //Notification to the ITIL object's observer group
                    case Notification::OBSERVER_GROUP:
                        $this->getLinkedGroupByType(CommonITILActor::OBSERVER);
                        break;
                        //Notification to the ITIL object's observer user
                    //Notification to the ITIL object's observer user
                    case Notification::OBSERVER:
                        $this->getLinkedUserByType(CommonITILActor::OBSERVER);
                        break;
                        //Notification to the supervisor of the ITIL object's observer group
                    //Notification to the supervisor of the ITIL object's observer group
                    case Notification::SUPERVISOR_OBSERVER_GROUP:
                        $this->getLinkedGroupSupervisorByType(CommonITILActor::OBSERVER);
                        break;
                        //Notification to the observer group without supervisor
                    //Notification to the observer group without supervisor
                    case Notification::OBSERVER_GROUP_WITHOUT_SUPERVISOR:
                        $this->getLinkedGroupWithoutSupervisorByType(CommonITILActor::OBSERVER);
                        break;
                }
        }
    }