NotificationTargetCommonITILObject::getAdditionalTargets PHP Method

getAdditionalTargets() public method

Get additionnals targets for ITIL objects
public getAdditionalTargets ( $event = '' )
$event (default '')
    function getAdditionalTargets($event = '')
    {
        if ($event == 'update') {
            $this->addTarget(Notification::OLD_TECH_IN_CHARGE, __('Former technician in charge of the ticket'));
        }
        if ($event == 'satisfaction') {
            $this->addTarget(Notification::AUTHOR, __('Requester'));
            $this->addTarget(Notification::RECIPIENT, __('Writer'));
        } else {
            if ($event != 'alertnotclosed') {
                $this->addTarget(Notification::RECIPIENT, __('Writer'));
                $this->addTarget(Notification::SUPPLIER, __('Supplier'));
                $this->addTarget(Notification::SUPERVISOR_ASSIGN_GROUP, __('Manager of the group in charge of the ticket'));
                $this->addTarget(Notification::ASSIGN_GROUP_WITHOUT_SUPERVISOR, __("Group in charge of the ticket except manager users"));
                $this->addTarget(Notification::SUPERVISOR_REQUESTER_GROUP, __('Requester group manager'));
                $this->addTarget(Notification::REQUESTER_GROUP_WITHOUT_SUPERVISOR, __("Requester group except manager users"));
                $this->addTarget(Notification::ITEM_TECH_IN_CHARGE, __('Technician in charge of the hardware'));
                $this->addTarget(Notification::ITEM_TECH_GROUP_IN_CHARGE, __('Group in charge of the hardware'));
                $this->addTarget(Notification::ASSIGN_TECH, __('Technician in charge of the ticket'));
                $this->addTarget(Notification::REQUESTER_GROUP, __('Requester group'));
                $this->addTarget(Notification::AUTHOR, __('Requester'));
                $this->addTarget(Notification::ITEM_USER, __('Hardware user'));
                $this->addTarget(Notification::ASSIGN_GROUP, __('Group in charge of the ticket'));
                $this->addTarget(Notification::OBSERVER_GROUP, __('Watcher group'));
                $this->addTarget(Notification::OBSERVER, __('Watcher'));
                $this->addTarget(Notification::SUPERVISOR_OBSERVER_GROUP, __('Watcher group manager'));
                $this->addTarget(Notification::OBSERVER_GROUP_WITHOUT_SUPERVISOR, __("Watcher group except manager users"));
            }
        }
        if ($event == 'validation' || $event == 'validation_answer') {
            $this->addTarget(Notification::VALIDATION_REQUESTER, __('Approval requester'));
            $this->addTarget(Notification::VALIDATION_APPROVER, __('Approver'));
        }
        if ($event == 'update_task' || $event == 'add_task' || $event == 'delete_task') {
            $this->addTarget(Notification::TASK_ASSIGN_TECH, __('Technician in charge of the task'));
            $this->addTarget(Notification::TASK_ASSIGN_GROUP, __('Group in charge of the task'));
            $this->addTarget(Notification::TASK_AUTHOR, __('Task author'));
        }
        if ($event == 'update_followup' || $event == 'add_followup' || $event == 'delete_followup') {
            $this->addTarget(Notification::FOLLOWUP_AUTHOR, __('Followup author'));
        }
    }