CommonITILObject::haveAGroup PHP Метод

haveAGroup() публичный Метод

Is one of groups linked to the object ?
public haveAGroup ( $type, array $groups ) : boolean
$type type to search (see constants)
$groups array array of group ID
Результат boolean
    function haveAGroup($type, array $groups)
    {
        if (is_array($groups) && count($groups) && isset($this->groups[$type])) {
            foreach ($groups as $groups_id) {
                foreach ($this->groups[$type] as $data) {
                    if ($data['groups_id'] == $groups_id) {
                        return true;
                    }
                }
            }
        }
        return false;
    }
CommonITILObject