Function __global->_find_all_pages
Definitions
sources/zones2.php
- Get an array of all the pages of the specified type (module, etc) and extension (for small sites everything will be returned, for larger ones it depends on the show method).
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $zone | ID_TEXT | No | No | required parameter | N/A | N/A | The zone name |
| $type | ID_TEXT | No | No | required parameter | modules modules_custom comcode/EN comcode_custom/EN html/EN html_custom/EN | N/A | The type (including language, if appropriate) |
| $ext | string | No | No | php | N/A | N/A | The file extension to limit us to (without a dot) |
| $keep_ext_on | boolean | No | No | False | N/A | N/A | Whether to leave file extensions on the page name |
| $cutoff_time | ?TIME | No | No | Null | N/A | N/A | Only show pages newer than (null: no restriction) |
| $show_method | integer | No | No | 0 | 0 1 2 | N/A | Selection algorithm constant |
| $custom | ?boolean | No | No | Null | N/A | N/A | Whether to search under the custom-file-base (null: auto-decide) |
Returns
- A map of page name to type (modules_custom, etc)
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get an array of all the pages of the specified type (module, etc) and extension (for small sites everything will be returned, for larger ones it depends on the show method).
*
* @param ID_TEXT $zone The zone name
* @param ID_TEXT $type The type (including language, if appropriate)
* @set modules modules_custom comcode/EN comcode_custom/EN html/EN html_custom/EN
* @param string $ext The file extension to limit us to (without a dot)
* @param boolean $keep_ext_on Whether to leave file extensions on the page name
* @param ?TIME $cutoff_time Only show pages newer than (null: no restriction)
* @param integer $show_method Selection algorithm constant
* @set 0 1 2
* @param ?boolean $custom Whether to search under the custom-file-base (null: auto-decide)
* @return array A map of page name to type (modules_custom, etc)
*/
function _find_all_pages(string $zone, string $type, string $ext = 'php', bool $keep_ext_on = false, ?int $cutoff_time = null, int $show_method = 0, ?bool $custom = null) : array
* Get an array of all the pages of the specified type (module, etc) and extension (for small sites everything will be returned, for larger ones it depends on the show method).
*
* @param ID_TEXT $zone The zone name
* @param ID_TEXT $type The type (including language, if appropriate)
* @set modules modules_custom comcode/EN comcode_custom/EN html/EN html_custom/EN
* @param string $ext The file extension to limit us to (without a dot)
* @param boolean $keep_ext_on Whether to leave file extensions on the page name
* @param ?TIME $cutoff_time Only show pages newer than (null: no restriction)
* @param integer $show_method Selection algorithm constant
* @set 0 1 2
* @param ?boolean $custom Whether to search under the custom-file-base (null: auto-decide)
* @return array A map of page name to type (modules_custom, etc)
*/
function _find_all_pages(string $zone, string $type, string $ext = 'php', bool $keep_ext_on = false, ?int $cutoff_time = null, int $show_method = 0, ?bool $custom = null) : array

