NotificationTargetCommonITILObject::getLinkedGroupWithoutSupervisorByType PHP Method

getLinkedGroupWithoutSupervisorByType() public method

Add linked group without supervisor to the notified user list
public getLinkedGroupWithoutSupervisorByType ( $type )
$type type of linked groups
    function getLinkedGroupWithoutSupervisorByType($type)
    {
        global $DB;
        $grouplinktable = getTableForItemType($this->obj->grouplinkclass);
        $fkfield = $this->obj->getForeignKeyField();
        $query = "SELECT `groups_id`\n                FROM `{$grouplinktable}`\n                WHERE `{$grouplinktable}`.`{$fkfield}` = '" . $this->obj->fields["id"] . "'\n                      AND `{$grouplinktable}`.`type` = '{$type}'";
        foreach ($DB->request($query) as $data) {
            //Add the group in the notified users list
            $this->getAddressesByGroup(2, $data['groups_id']);
        }
    }