Function Module_admin_cns_forums->get_forum_tree

Definitions

adminzone/pages/modules/admin_cns_forums.php

  • Get a UI to choose a forum to edit.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$id AUTO_LINK No No required parameter N/A N/A The ID of the forum we are generating the tree below (start recursion with db_get_first_id())
$forum SHORT_TEXT No No required parameter N/A N/A The name of the forum $id
&$all_forums array Yes No required parameter N/A N/A A list of rows of all forums, or [] if the function is to get the list itself
$position integer No No 0 N/A N/A The relative position of this forum wrt the others on the same level/branch in the UI
$sub_num_in_parent_forum_grouping integer No No 1 N/A N/A The number of forums in the parent forum grouping
$order_sub_alpha ?BINARY No No Null N/A N/A Whether to order own subcategories alphabetically (null: ask the DB)
$parent_order_sub_alpha ?BINARY No No Null N/A N/A Whether to order subcategories alphabetically (null: ask the DB)
$huge boolean No No False N/A N/A Whether we are dealing with a huge forum structure

Returns

  • The UI
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a UI to choose a forum to edit.
 *
 * @param  AUTO_LINK $id The ID of the forum we are generating the tree below (start recursion with db_get_first_id())
 * @param  SHORT_TEXT $forum The name of the forum $id
 * @param  array $all_forums A list of rows of all forums, or [] if the function is to get the list itself
 * @param  integer $position The relative position of this forum wrt the others on the same level/branch in the UI
 * @param  integer $sub_num_in_parent_forum_grouping The number of forums in the parent forum grouping
 * @param  ?BINARY $order_sub_alpha Whether to order own subcategories alphabetically (null: ask the DB)
 * @param  ?BINARY $parent_order_sub_alpha Whether to order subcategories alphabetically (null: ask the DB)
 * @param  boolean $huge Whether we are dealing with a huge forum structure
 * @return Tempcode The UI
 */

public function get_forum_tree(int $id, string $forum, array &$all_forums, int $position = 0, int $sub_num_in_parent_forum_grouping = 1, ?int $order_sub_alpha = null, ?int $parent_order_sub_alpha = null, bool $huge = false) : object