Function Hook_sitemap_config_category->get_virtual_nodes

Definitions

sources/hooks/systems/sitemap/config_category.php

  • Find details of a virtual position in the sitemap. Virtual positions have no structure of their own, but can find child structures to be absorbed down the tree. We do this for modularity reasons.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$page_link ID_TEXT No No required parameter N/A N/A The page-link we are finding
$callback ?mixed No No Null N/A N/A Callback function to send discovered page-links to (null: return)
$valid_node_types ?array No No Null N/A N/A List of node types we will return/recurse-through (null: no limit)
$child_cutoff ?integer No No Null N/A N/A Maximum number of children before we cut off all children (null: no limit)
$max_recurse_depth ?integer No No Null N/A N/A How deep to go from the sitemap root (null: no limit)
$recurse_level integer No No 0 N/A N/A Our recursion depth (used to limit recursion, or to calculate importance of page-link, used for instance by XML Sitemap [deeper is typically less important])
$options integer No No 0 N/A N/A A bitmask of SITEMAP_GEN_* options
$zone ID_TEXT No No _SEARCH N/A N/A The zone we will consider ourselves to be operating in (needed due to transparent redirects feature)
$meta_gather integer No No 0 N/A N/A A bitmask of SITEMAP_GATHER_* constants, of extra data to include
$return_anyway boolean No No False N/A N/A Whether to return the structure even if there was a callback. Do not pass this setting through via recursion due to memory concerns, it is used only to gather information to detect and prevent parent/child duplication of default entry points.

Returns

  • List of node structures (null: working via callback)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find details of a virtual position in the sitemap. Virtual positions have no structure of their own, but can find child structures to be absorbed down the tree. We do this for modularity reasons.
 *
 * @param  ID_TEXT $page_link The page-link we are finding
 * @param  ?mixed $callback Callback function to send discovered page-links to (null: return)
 * @param  ?array $valid_node_types List of node types we will return/recurse-through (null: no limit)
 * @param  ?integer $child_cutoff Maximum number of children before we cut off all children (null: no limit)
 * @param  ?integer $max_recurse_depth How deep to go from the sitemap root (null: no limit)
 * @param  integer $recurse_level Our recursion depth (used to limit recursion, or to calculate importance of page-link, used for instance by XML Sitemap [deeper is typically less important])
 * @param  integer $options A bitmask of SITEMAP_GEN_* options
 * @param  ID_TEXT $zone The zone we will consider ourselves to be operating in (needed due to transparent redirects feature)
 * @param  integer $meta_gather A bitmask of SITEMAP_GATHER_* constants, of extra data to include
 * @param  boolean $return_anyway Whether to return the structure even if there was a callback. Do not pass this setting through via recursion due to memory concerns, it is used only to gather information to detect and prevent parent/child duplication of default entry points.
 * @return ?array List of node structures (null: working via callback)
 */

public function get_virtual_nodes(string $page_link, $callback = null, ?array $valid_node_types = null, ?int $child_cutoff = null, ?int $max_recurse_depth = null, int $recurse_level = 0, int $options = 0, string $zone = '_SEARCH', int $meta_gather = 0, bool $return_anyway = false) : ?array