Function __global->create_selection_list

Definitions

sources/sitemap.php

  • Get an HTML selection list for some part of the Sitemap.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$root_page_link ID_TEXT No No required parameter N/A N/A The page-link we are starting from
$under_only boolean No No False N/A N/A Create from under this node, rather than at it
$default ?ID_TEXT No No Null N/A N/A Default selection (null: none)
$valid_node_types ?array No No Null N/A N/A List of node types we will return/recurse-through (null: no limit)
$valid_selectable_content_types ?array No No Null N/A N/A List of node types we will allow to be selectable (null: no limit)
$check_permissions_against integer No No 0 N/A N/A Check permissions according to this bitmask of possibilities (requiring all in the bitmask to be matched)
$check_permissions_for ?MEMBER No No Null N/A N/A The member we are checking permissions for (null: current member)
$consider_validation boolean No No False N/A N/A Whether to filter out entries which are not validated if the $check_permissions_for user doesn't have the privilege to see them AND doesn't own them
$only_owned ?MEMBER No No Null N/A N/A The member we are only finding owned content of (null: no such limit); nodes leading up to owned content will be shown, but not as selectable
$use_compound_list boolean No No False N/A N/A Whether to produce selection IDs as a comma-separated list of all selectable sub-nodes
$filter_func ?mixed No No Null N/A N/A Filter function for limiting what rows will be included (null: none)

Returns

  • List
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get an HTML selection list for some part of the Sitemap.
 *
 * @param  ID_TEXT $root_page_link The page-link we are starting from
 * @param  boolean $under_only Create from under this node, rather than at it
 * @param  ?ID_TEXT $default Default selection (null: none)
 * @param  ?array $valid_node_types List of node types we will return/recurse-through (null: no limit)
 * @param  ?array $valid_selectable_content_types List of node types we will allow to be selectable (null: no limit)
 * @param  integer $check_permissions_against Check permissions according to this bitmask of possibilities (requiring all in the bitmask to be matched)
 * @param  ?MEMBER $check_permissions_for The member we are checking permissions for (null: current member)
 * @param  boolean $consider_validation Whether to filter out entries which are not validated if the $check_permissions_for user doesn't have the privilege to see them AND doesn't own them
 * @param  ?MEMBER $only_owned The member we are only finding owned content of (null: no such limit); nodes leading up to owned content will be shown, but not as selectable
 * @param  boolean $use_compound_list Whether to produce selection IDs as a comma-separated list of all selectable sub-nodes
 * @param  ?mixed $filter_func Filter function for limiting what rows will be included (null: none)
 * @return Tempcode List
 */

function create_selection_list(string $root_page_link, bool $under_only = false, ?string $default = null, ?array $valid_node_types = null, ?array $valid_selectable_content_types = null, int $check_permissions_against = 0, ?int $check_permissions_for = null, bool $consider_validation = false, ?int $only_owned = null, bool $use_compound_list = false, $filter_func = null) : object