Function __global->get_downloads_tree
Definitions
sources/downloads.php
- Get a list of maps containing all the downloads, and path information, under the specified category - 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 |
|---|---|---|---|---|---|---|---|
| $submitter | ?MEMBER | No | No | Null | N/A | N/A | Only show images/videos submitted by this member (null: no filter) |
| $category_id | ?AUTO_LINK | No | No | Null | N/A | N/A | The category being at the root of our recursion (null: true root) |
| $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) |
| $title | ?ID_TEXT | No | No | Null | N/A | N/A | The name of the $category_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 |
| $shun | ?integer | No | No | Null | N/A | N/A | The number of recursive levels to search (null: all) |
| $levels | ?AUTO_LINK | No | No | Null | N/A | N/A | Download we do not want to show (null: none to not show) |
| $use_compound_list | boolean | No | No | False | N/A | N/A | Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs |
| $editable_filter | boolean | No | No | False | N/A | N/A | Whether to only show for what may be edited by the current member |
| $tar_filter | boolean | No | No | False | N/A | N/A | Whether to only show entries that are TAR files (addons) |
Returns
- A list of maps for all categories. Each map entry containing the fields 'id' (category ID) and 'breadcrumbs' (to the category, including the categories own title), and more. Or if $use_compound_list, the tree structure built with pairs containing the compound list in addition to the child branches
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get a list of maps containing all the downloads, and path information, under the specified category - and those beneath it, recursively.
*
* @param ?MEMBER $submitter Only show images/videos submitted by this member (null: no filter)
* @param ?AUTO_LINK $category_id The category being at the root of our recursion (null: true root)
* @param ?string $breadcrumbs The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
* @param ?ID_TEXT $title The name of the $category_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 ?integer $shun The number of recursive levels to search (null: all)
* @param ?AUTO_LINK $levels Download we do not want to show (null: none to not show)
* @param boolean $use_compound_list Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs
* @param boolean $editable_filter Whether to only show for what may be edited by the current member
* @param boolean $tar_filter Whether to only show entries that are TAR files (addons)
* @return array A list of maps for all categories. Each map entry containing the fields 'id' (category ID) and 'breadcrumbs' (to the category, including the categories own title), and more. Or if $use_compound_list, the tree structure built with pairs containing the compound list in addition to the child branches
*/
function get_downloads_tree(?int $submitter = null, ?int $category_id = null, ?string $breadcrumbs = null, ?string $title = null, ?int $shun = null, ?int $levels = null, bool $use_compound_list = false, bool $editable_filter = false, bool $tar_filter = false) : array
* Get a list of maps containing all the downloads, and path information, under the specified category - and those beneath it, recursively.
*
* @param ?MEMBER $submitter Only show images/videos submitted by this member (null: no filter)
* @param ?AUTO_LINK $category_id The category being at the root of our recursion (null: true root)
* @param ?string $breadcrumbs The breadcrumbs up to this point in the recursion (null: blank, as we are starting the recursion)
* @param ?ID_TEXT $title The name of the $category_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 ?integer $shun The number of recursive levels to search (null: all)
* @param ?AUTO_LINK $levels Download we do not want to show (null: none to not show)
* @param boolean $use_compound_list Whether to get a list of child categories (not just direct ones, recursively), instead of just IDs
* @param boolean $editable_filter Whether to only show for what may be edited by the current member
* @param boolean $tar_filter Whether to only show entries that are TAR files (addons)
* @return array A list of maps for all categories. Each map entry containing the fields 'id' (category ID) and 'breadcrumbs' (to the category, including the categories own title), and more. Or if $use_compound_list, the tree structure built with pairs containing the compound list in addition to the child branches
*/
function get_downloads_tree(?int $submitter = null, ?int $category_id = null, ?string $breadcrumbs = null, ?string $title = null, ?int $shun = null, ?int $levels = null, bool $use_compound_list = false, bool $editable_filter = false, bool $tar_filter = false) : array

