Function __global->request_page

Definitions

sources/site.php

  • Take the specified parameters, and try to find the corresponding page, then execute a function to load the page (load_html_page/load_comcode_page).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$codename ID_TEXT No No required parameter N/A N/A The codename of the page to load
$required boolean No No required parameter N/A N/A Whether it is required for this page to exist (shows an error if it doesn't) -- otherwise, it will just return null
$zone ?ID_TEXT No No Null N/A N/A The zone the page is being loaded in (null: as shown by access URL)
$page_type ?ID_TEXT No No Null N/A N/A The type of page - for if you know it (null: don't know it)
$being_included boolean No No False N/A N/A Whether the page is being included from another
$redirect_check boolean No No True N/A N/A Whether to check for redirects (normally you would)
&$page_missing boolean Yes No False N/A N/A Whether the page is missing (returned by reference)

Returns

  • The page
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Take the specified parameters, and try to find the corresponding page, then execute a function to load the page (load_html_page/load_comcode_page).
 *
 * @param  ID_TEXT $codename The codename of the page to load
 * @param  boolean $required Whether it is required for this page to exist (shows an error if it doesn't) -- otherwise, it will just return null
 * @param  ?ID_TEXT $zone The zone the page is being loaded in (null: as shown by access URL)
 * @param  ?ID_TEXT $page_type The type of page - for if you know it (null: don't know it)
 * @param  boolean $being_included Whether the page is being included from another
 * @param  boolean $redirect_check Whether to check for redirects (normally you would)
 * @param  boolean $page_missing Whether the page is missing (returned by reference)
 * @return Tempcode The page
 */

function request_page(string $codename, bool $required, ?string $zone = null, ?string $page_type = null, bool $being_included = false, bool $redirect_check = true, bool &$page_missing = false) : object