Function __global->get_page_zone

Definitions

sources/zones.php

  • Find the zone a page is in.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$page_name ID_TEXT No No required parameter N/A N/A The page name to find
$error boolean No No True N/A N/A Whether the software should bomb out if the page was not found
$first_zone_to_check ?ID_TEXT No No Null N/A N/A First zone to check (used for an optimisation) (null: current zone)
$type ?ID_TEXT No No Null N/A N/A Page type (null: check all)

Returns

  • The zone the page is in (null: missing)
  • Type: ?ID_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the zone a page is in.
 *
 * @param  ID_TEXT $page_name The page name to find
 * @param  boolean $error Whether the software should bomb out if the page was not found
 * @param  ?ID_TEXT $first_zone_to_check First zone to check (used for an optimisation) (null: current zone)
 * @param  ?ID_TEXT $type Page type (null: check all)
 * @return ?ID_TEXT The zone the page is in (null: missing)
 */

function get_page_zone(string $page_name, bool $error = true, ?string $first_zone_to_check = null, ?string $type = null) : ?string