Function __global->count_download_category_children

Definitions

sources/downloads.php

  • Count the downloads and subcategories underneath the specified category, 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
$category_id AUTO_LINK No No required parameter N/A N/A The ID of the category for which count details are collected

Returns

  • The number of downloads is returned in $output['num_downloads'], and the number of subcategories is returned in $output['num_children'], and the (possibly recursive) number of downloads is returned in $output['num_downloads_children']
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Count the downloads and subcategories underneath the specified category, recursively.
 *
 * @param  AUTO_LINK $category_id The ID of the category for which count details are collected
 * @return array The number of downloads is returned in $output['num_downloads'], and the number of subcategories is returned in $output['num_children'], and the (possibly recursive) number of downloads is returned in $output['num_downloads_children']
 */

function count_download_category_children(int $category_id) : array