Function __global->form_input_theme_image

Definitions

sources/form_templates.php

  • Get the Tempcode to choose a picture from the given list of images in the theme image system, with sub-categorisation.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$pretty_name mixed No No required parameter N/A N/A A human intelligible name for this input field, provided in plain-text format (string or Tempcode)
$description mixed No No required parameter N/A N/A A description for this input field, provided in HTML format (string or Tempcode)
$name ID_TEXT No No required parameter N/A N/A The name which this input field is for
$ids array No No required parameter N/A N/A A list of image IDs (codes) we can choose from, probably found via get_all_image_ids_type
$selected_url ?URLPATH No No Null N/A N/A The currently selected entry in our picture choosing, by URL (null: none)
$selected_code ?string No No Null N/A N/A The currently selected entry in our picture choosing, by code (null: none)
$tabindex ?integer No No Null N/A N/A The tab index of the field (null: not specified)
$allow_none boolean No No False N/A N/A Whether to allow the selection of 'no' picture
$db ?object No No Null N/A N/A The database connector to the Conversr install we are choosing images from (null: site db)
$theme ?ID_TEXT No No Null N/A N/A Theme to use (null: current theme)
$lang ?ID_TEXT No No Null N/A N/A Language to use (null: current language)
$linear boolean No No False N/A N/A Whether choices are presented in a list (as opposed to a grid); useful when sizes are irregular
$direct_titles boolean No No False N/A N/A Whether to show direct codenames, rather than trying to prettify them into titles

Returns

  • The input field
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the Tempcode to choose a picture from the given list of images in the theme image system, with sub-categorisation.
 *
 * @param  mixed $pretty_name A human intelligible name for this input field, provided in plain-text format (string or Tempcode)
 * @param  mixed $description A description for this input field, provided in HTML format (string or Tempcode)
 * @param  ID_TEXT $name The name which this input field is for
 * @param  array $ids A list of image IDs (codes) we can choose from, probably found via get_all_image_ids_type
 * @param  ?URLPATH $selected_url The currently selected entry in our picture choosing, by URL (null: none)
 * @param  ?string $selected_code The currently selected entry in our picture choosing, by code (null: none)
 * @param  ?integer $tabindex The tab index of the field (null: not specified)
 * @param  boolean $allow_none Whether to allow the selection of 'no' picture
 * @param  ?object $db The database connector to the Conversr install we are choosing images from (null: site db)
 * @param  ?ID_TEXT $theme Theme to use (null: current theme)
 * @param  ?ID_TEXT $lang Language to use (null: current language)
 * @param  boolean $linear Whether choices are presented in a list (as opposed to a grid); useful when sizes are irregular
 * @param  boolean $direct_titles Whether to show direct codenames, rather than trying to prettify them into titles
 * @return Tempcode The input field
 */

function form_input_theme_image($pretty_name, $description, string $name, array $ids, ?string $selected_url = null, ?string $selected_code = null, ?int $tabindex = null, bool $allow_none = false, ?object $db = null, ?string $theme = null, ?string $lang = null, bool $linear = false, bool $direct_titles = false) : object