Function __global->get_wiki_page_tree

Definitions

sources/wiki.php

  • Get a list of maps containing all the subcategories, and path information, of the specified Wiki+ page - and those beneath it, recursively.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
&$wiki_seen array Yes No required parameter N/A N/A A list of pages we've already seen (we don't repeat them in multiple list positions)
$page_id ?AUTO_LINK No No Null N/A N/A The page being at the root of our recursion (null: true root page)
$breadcrumbs ?string No No Null N/A N/A The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
$page_details ?array No No Null N/A N/A The details of the $page_id we are currently going through (null: look it up). This is here for efficiency reasons, as finding children IDs to recurse to also reveals the child's title
$do_stats boolean No No False N/A N/A Whether to collect post counts with our breadcrumbs information
$use_compound_list boolean No No False N/A N/A Whether to make a compound list (a pair of a comma-separated list of children, and the child array)
$levels ?integer No No Null N/A N/A The number of recursive levels to search (null: all)

Returns

  • A list of maps for all subcategories, contains more details if stats were requested
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get a list of maps containing all the subcategories, and path information, of the specified Wiki+ page - and those beneath it, recursively.
 *
 * @param  array $wiki_seen A list of pages we've already seen (we don't repeat them in multiple list positions)
 * @param  ?AUTO_LINK $page_id The page being at the root of our recursion (null: true root page)
 * @param  ?string $breadcrumbs The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
 * @param  ?array $page_details The details of the $page_id we are currently going through (null: look it up). This is here for efficiency reasons, as finding children IDs to recurse to also reveals the child's title
 * @param  boolean $do_stats Whether to collect post counts with our breadcrumbs information
 * @param  boolean $use_compound_list Whether to make a compound list (a pair of a comma-separated list of children, and the child array)
 * @param  ?integer $levels The number of recursive levels to search (null: all)
 * @return array A list of maps for all subcategories, contains more details if stats were requested
 */

function get_wiki_page_tree(array &$wiki_seen, ?int $page_id = null, ?string $breadcrumbs = null, ?array $page_details = null, bool $do_stats = false, bool $use_compound_list = false, ?int $levels = null) : array