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.
- 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) |
| $group_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The usergroup ID |
| $overridables | array | No | No | required parameter | N/A | N/A | Output of content type module's get_privilege_overrides function |
| $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 |
| $max | integer | No | No | required parameter | N/A | N/A | Maximum number of items to show from any one content type |
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.
*
* @param ?array $filters Filter to only these save IDs (for testing) (null: no filter)
* @param AUTO_LINK $group_id The usergroup ID
* @param array $overridables Output of content type module's get_privilege_overrides function
* @param object $hook_ob The content type object
* @param array $info The content type info map
* @param integer $max Maximum number of items to show from any one content type
* @return array List of item maps, ready for template
*/
protected function build_content_item_tree(?array $filters, int $group_id, array $overridables, object $hook_ob, array $info, int $max) : array
* Build a flattened tree showing content items of a particular type.
*
* @param ?array $filters Filter to only these save IDs (for testing) (null: no filter)
* @param AUTO_LINK $group_id The usergroup ID
* @param array $overridables Output of content type module's get_privilege_overrides function
* @param object $hook_ob The content type object
* @param array $info The content type info map
* @param integer $max Maximum number of items to show from any one content type
* @return array List of item maps, ready for template
*/
protected function build_content_item_tree(?array $filters, int $group_id, array $overridables, object $hook_ob, array $info, int $max) : array

