Function __global->get_module_zone

Definitions

sources/zones.php

  • Find the zone a module 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
$module_name ID_TEXT No No required parameter N/A N/A The page name to find
$type ID_TEXT No No modules N/A N/A The type of the page we are looking for
$dir2 ?string No No Null N/A N/A The special subcategorisation of page we are looking for (e.g. 'EN' for a Comcode page) (null: none)
$ftype string No No php N/A N/A The file extension for the page type
$error boolean No No True N/A N/A Whether the software should bomb out if the page was not found
$check_redirects boolean No No True N/A N/A Whether to check against redirects
$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 page is in (null: not found)
  • Type: ?ID_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the zone a module is in.
 *
 * @param  ID_TEXT $module_name The page name to find
 * @param  ID_TEXT $type The type of the page we are looking for
 * @param  ?string $dir2 The special subcategorisation of page we are looking for (e.g. 'EN' for a Comcode page) (null: none)
 * @param  string $ftype The file extension for the page type
 * @param  boolean $error Whether the software should bomb out if the page was not found
 * @param  boolean $check_redirects Whether to check against redirects
 * @param  ?ID_TEXT $first_zone_to_check First zone to check (used for an optimisation) (null: current zone)
 * @return ?ID_TEXT The zone the page is in (null: not found)
 */

function get_module_zone(string $module_name, string $type = 'modules', ?string $dir2 = null, string $ftype = 'php', bool $error = true, bool $check_redirects = true, ?string $first_zone_to_check = null) : ?string