Function __global->find_all_pages

Definitions

sources/zones.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 page type
$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

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 page type
 * @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
 * @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) : array