Function Module_admin_permissions->_build_content_item_tree

Definitions

adminzone/pages/modules/admin_permissions.php

  • Build a flattened tree showing content items of a particular type - recursion function.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$filters ?array No No required parameter N/A N/A Filter to only these save IDs (for testing) (null: no filter)
$overridables array No No required parameter N/A N/A Output of content type module's get_privilege_overrides function
$group_category_access array No No required parameter N/A N/A List of category access rows
$_group_privileges array No No required parameter N/A N/A Database data of privileges for the content type
$save_id_stub string No No required parameter N/A N/A Stub of save ID we'll be using
$hook_ob object No No required parameter N/A N/A The content type object
$info array No No required parameter N/A N/A The content type info map
$row array No No required parameter N/A N/A Row for point in recursion
&$rows array Yes No required parameter N/A N/A All rows
$depth integer No No 1 N/A N/A Current recursion depth

Returns

  • List of item maps, ready for template
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Build a flattened tree showing content items of a particular type - recursion function.
 *
 * @param  ?array $filters Filter to only these save IDs (for testing) (null: no filter)
 * @param  array $overridables Output of content type module's get_privilege_overrides function
 * @param  array $group_category_access List of category access rows
 * @param  array $_group_privileges Database data of privileges for the content type
 * @param  string $save_id_stub Stub of save ID we'll be using
 * @param  object $hook_ob The content type object
 * @param  array $info The content type info map
 * @param  array $row Row for point in recursion
 * @param  array $rows All rows
 * @param  integer $depth Current recursion depth
 * @return array List of item maps, ready for template
 */

protected function _build_content_item_tree(?array $filters, array $overridables, array $group_category_access, array $_group_privileges, string $save_id_stub, object $hook_ob, array $info, array $row, array &$rows, int $depth = 1) : array