Function __global->_do_contents_level
Definitions
sources/comcode_renderer.php
- Recursive algorithm to make table of contents.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $tree_structure | array | No | No | required parameter | N/A | N/A | The TOC (sub)tree |
| $list_types | array | No | No | required parameter | N/A | N/A | The list types to use for each level |
| $base | integer | No | No | required parameter | N/A | N/A | The level to start from |
| $the_level | integer | No | No | 0 | N/A | N/A | The level we are at in the recursion |
Returns
- The TOC node
- Type: Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Recursive algorithm to make table of contents.
*
* @param array $tree_structure The TOC (sub)tree
* @param array $list_types The list types to use for each level
* @param integer $base The level to start from
* @param integer $the_level The level we are at in the recursion
* @return Tempcode The TOC node
*/
function _do_contents_level(array $tree_structure, array $list_types, int $base, int $the_level = 0) : object
* Recursive algorithm to make table of contents.
*
* @param array $tree_structure The TOC (sub)tree
* @param array $list_types The list types to use for each level
* @param integer $base The level to start from
* @param integer $the_level The level we are at in the recursion
* @return Tempcode The TOC node
*/
function _do_contents_level(array $tree_structure, array $list_types, int $base, int $the_level = 0) : object

