Function __global->_copy_from_sitemap_to_new_menu

Definitions

sources/menus2.php

  • Copy a Sitemap node's children into a new menu.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$target_menu ID_TEXT No No required parameter N/A N/A The ID of the menu to save into
$node array No No required parameter N/A N/A Sitemap node, containing children
&$order integer Yes No required parameter N/A N/A Sequence order to save with
$parent ?AUTO_LINK No No Null N/A N/A Menu parent ID (null: root)

Preview

Code (PHP)

/**
 * Copy a Sitemap node's children into a new menu.
 *
 * @param  ID_TEXT $target_menu The ID of the menu to save into
 * @param  array $node Sitemap node, containing children
 * @param  integer $order Sequence order to save with
 * @param  ?AUTO_LINK $parent Menu parent ID (null: root)
 */

function _copy_from_sitemap_to_new_menu(string $target_menu, array $node, int &$order, ?int $parent = null)