Function Module_admin_site_messaging->get_form_fields

Definitions

adminzone/pages/modules/admin_site_messaging.php

  • Get Tempcode for a site message form.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$id ?AUTO_LINK No No Null N/A N/A The message ID (null: new)
$title SHORT_TEXT No No Blank (empty string) N/A N/A The title (blank: new)
$message LONG_TEXT No No Blank (empty string) N/A N/A The message (blank: new)
$type ID_TEXT No No inform inform notice warn N/A The message type
$start_date_time ?TIME No No Null N/A N/A The start time (null: not set or new)
$end_date_time ?TIME No No Null N/A N/A The end time (null: not set or new)
$validated BINARY No No 1 N/A N/A Whether this entry is validated
$groups array No No [] N/A N/A List of groups of which to limit the message (empty: no limit or new)
$page_links array No No [] N/A N/A List of page links of which to limit the message (empty: no limit or new)

Returns

  • A duple: The input fields, hidden fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get Tempcode for a site message form.
 *
 * @param  ?AUTO_LINK $id The message ID (null: new)
 * @param  SHORT_TEXT $title The title (blank: new)
 * @param  LONG_TEXT $message The message (blank: new)
 * @param  ID_TEXT $type The message type
 * @set inform notice warn
 * @param  ?TIME $start_date_time The start time (null: not set or new)
 * @param  ?TIME $end_date_time The end time (null: not set or new)
 * @param  BINARY $validated Whether this entry is validated
 * @param  array $groups List of groups of which to limit the message (empty: no limit or new)
 * @param  array $page_links List of page links of which to limit the message (empty: no limit or new)
 * @return array A duple: The input fields, hidden fields
 */

public function get_form_fields(?int $id = null, string $title = '', string $message = '', string $type = 'inform', ?int $start_date_time = null, ?int $end_date_time = null, int $validated = 1, array $groups = [], array $page_links = []) : array