Function __global->get_comcode_zone

Definitions

sources/zones.php

  • Find the zone a Comcode 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 Comcode 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)

Returns

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

Preview

Code (PHP)

/**
 * Find the zone a Comcode page is in.
 *
 * @param  ID_TEXT $page_name The Comcode 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)
 * @return ?ID_TEXT The zone the Comcode page is in (null: missing)
 */

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