Function __global->map_table_screen

Definitions

sources/templates_map_table.php

  • Get the Tempcode for a map screen. (a map shows a single entry, with the field name for each field to the left of the value).
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: object

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$title Tempcode No No required parameter N/A N/A The title of the map screen; should be out of get_screen_title
$fields array No No required parameter N/A N/A An array of mappings between title and value (each mapping being a field)
$auto_escape boolean No No required parameter N/A N/A Whether to automatically escape each plain-text entry so that it cannot contain HTML (ignored for Tempcode values)
$text ?Tempcode No No Null N/A N/A Text to show (null: none)
$buttons ?Tempcode No No Null N/A N/A Buttons to show (null: none)
$responsive boolean No No False N/A N/A Use a responsive layout for the table (too much to fit in 2 columns on a small screen)

Returns

  • The generated map screen
  • Type: Tempcode
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get the Tempcode for a map screen. (a map shows a single entry, with the field name for each field to the left of the value).
 *
 * @param  Tempcode $title The title of the map screen; should be out of get_screen_title
 * @param  array $fields An array of mappings between title and value (each mapping being a field)
 * @param  boolean $auto_escape Whether to automatically escape each plain-text entry so that it cannot contain HTML (ignored for Tempcode values)
 * @param  ?Tempcode $text Text to show (null: none)
 * @param  ?Tempcode $buttons Buttons to show (null: none)
 * @param  boolean $responsive Use a responsive layout for the table (too much to fit in 2 columns on a small screen)
 * @return Tempcode The generated map screen
 */

function map_table_screen(object $title, array $fields, bool $auto_escape, ?object $text = null, ?object $buttons = null, bool $responsive = false) : object