Function __global->create_selection_list_forum_tree
Definitions
sources/cns_forums2.php
- Generate a Tempcode tree based selection list for choosing a forum. Also capable of getting comma-separated ancestor forum lists.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | ?MEMBER | No | No | Null | N/A | N/A | The member that the view privileges are done for (null: current member) |
| $base_forum | ?AUTO_LINK | No | No | Null | N/A | N/A | The forum we are starting from (null: capture the whole tree) |
| $selected_forum | ?array | No | No | Null | N/A | N/A | The forum(s) to select by default (null: no preference). An array of AUTO_LINK's (for IDs) or strings (for names). |
| $use_compound_list | boolean | No | No | False | N/A | N/A | Whether to generate a compound list (a list of all the ancestors, for each point in the forum tree) as well as the tree |
| $levels | ?integer | No | No | Null | N/A | N/A | The number of recursive levels to search (null: all) |
| $updated_since | ?TIME | No | No | Null | N/A | N/A | Time from which content must be updated (null: no limit) |
Returns
- Forum selection list
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Generate a Tempcode tree based selection list for choosing a forum. Also capable of getting comma-separated ancestor forum lists.
*
* @param ?MEMBER $member_id The member that the view privileges are done for (null: current member)
* @param ?AUTO_LINK $base_forum The forum we are starting from (null: capture the whole tree)
* @param ?array $selected_forum The forum(s) to select by default (null: no preference). An array of AUTO_LINK's (for IDs) or strings (for names).
* @param boolean $use_compound_list Whether to generate a compound list (a list of all the ancestors, for each point in the forum tree) as well as the tree
* @param ?integer $levels The number of recursive levels to search (null: all)
* @param ?TIME $updated_since Time from which content must be updated (null: no limit)
* @return Tempcode Forum selection list
*/
function create_selection_list_forum_tree(?int $member_id = null, ?int $base_forum = null, ?array $selected_forum = null, bool $use_compound_list = false, ?int $levels = null, ?int $updated_since = null) : object
* Generate a Tempcode tree based selection list for choosing a forum. Also capable of getting comma-separated ancestor forum lists.
*
* @param ?MEMBER $member_id The member that the view privileges are done for (null: current member)
* @param ?AUTO_LINK $base_forum The forum we are starting from (null: capture the whole tree)
* @param ?array $selected_forum The forum(s) to select by default (null: no preference). An array of AUTO_LINK's (for IDs) or strings (for names).
* @param boolean $use_compound_list Whether to generate a compound list (a list of all the ancestors, for each point in the forum tree) as well as the tree
* @param ?integer $levels The number of recursive levels to search (null: all)
* @param ?TIME $updated_since Time from which content must be updated (null: no limit)
* @return Tempcode Forum selection list
*/
function create_selection_list_forum_tree(?int $member_id = null, ?int $base_forum = null, ?array $selected_forum = null, bool $use_compound_list = false, ?int $levels = null, ?int $updated_since = null) : object
