public function getAllPrivilegesByType($type)
    {
        $this->initialize();
        $privileges = [];
        foreach ($this->roles as $role) {
            $privileges = array_merge($privileges, $role->getPrivilegesByType($type));
        }
        return $privileges;
    }
public function getAllPrivilegesByType($type)
    {
        $this->initialize();
        $privileges = [];
        foreach ($this->roles as $role) {
            $privileges = array_merge($privileges, $role->getPrivilegesByType($type));
        }
        return $privileges;
    }
public function getAllPrivilegesByType ( $ type ) { $ this -> initialize ( ) ; $ privileges = [ ] ; foreach ( $ this -> roles as $ role ) { $ privileges = array_merge ( $ privileges , $ role -> getPrivilegesByType ( $ type ) ) ; } return $ privileges ; }
Returns all privileges of the given type

@param string $type Full qualified class or interface name
@return array
Returns all privileges of the given type