Function Forum_driver_cns->_get_usergroup_list
Definitions
sources/forum/cns.php
- Get the forum usergroup list. This is useful to enumerate usergroups, or to find usergroup names.
- Visibility: protected
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$hide_hidden | boolean | No | No | False | N/A | N/A | Whether to obscure the name of hidden usergroups |
$only_permissive | boolean | No | No | False | N/A | N/A | Whether to only grab permissive usergroups |
$force_show_all | boolean | No | No | False | N/A | N/A | Do not limit things even if there are huge numbers of usergroups |
$force_find | array | No | No | [] | N/A | N/A | Usergroups that must be included in the results |
$for_member | ?MEMBER | No | No | Null | N/A | N/A | Always return usergroups of this member if otherwise there are too many to return in full (null: current member) |
$skip_hidden | boolean | No | No | False | N/A | N/A | Whether to completely skip hidden usergroups |
Returns
- The usergroup list, a map of usergroup ID to usergroup name
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get the forum usergroup list. This is useful to enumerate usergroups, or to find usergroup names.
*
* @param boolean $hide_hidden Whether to obscure the name of hidden usergroups
* @param boolean $only_permissive Whether to only grab permissive usergroups
* @param boolean $force_show_all Do not limit things even if there are huge numbers of usergroups
* @param array $force_find Usergroups that must be included in the results
* @param ?MEMBER $for_member Always return usergroups of this member if otherwise there are too many to return in full (null: current member)
* @param boolean $skip_hidden Whether to completely skip hidden usergroups
* @return array The usergroup list, a map of usergroup ID to usergroup name
*/
protected function _get_usergroup_list(bool $hide_hidden = false, bool $only_permissive = false, bool $force_show_all = false, array $force_find = [], ?int $for_member = null, bool $skip_hidden = false) : array
* Get the forum usergroup list. This is useful to enumerate usergroups, or to find usergroup names.
*
* @param boolean $hide_hidden Whether to obscure the name of hidden usergroups
* @param boolean $only_permissive Whether to only grab permissive usergroups
* @param boolean $force_show_all Do not limit things even if there are huge numbers of usergroups
* @param array $force_find Usergroups that must be included in the results
* @param ?MEMBER $for_member Always return usergroups of this member if otherwise there are too many to return in full (null: current member)
* @param boolean $skip_hidden Whether to completely skip hidden usergroups
* @return array The usergroup list, a map of usergroup ID to usergroup name
*/
protected function _get_usergroup_list(bool $hide_hidden = false, bool $only_permissive = false, bool $force_show_all = false, array $force_find = [], ?int $for_member = null, bool $skip_hidden = false) : array