Function __global->edit_site_message

Definitions

sources/site_messaging2.php

  • Edit a site message.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

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

Preview

Code (PHP)

/**
 * Edit a site message.
 *
 * @param  AUTO_LINK $id The ID of the message we are editing
 * @param  SHORT_TEXT $title The title
 * @param  LONG_TEXT $message The message
 * @param  ID_TEXT $type The message type
 * @set inform notice warn
 * @param  BINARY $validated Whether this entry is validated
 * @param  ?TIME $start_date_time The start time (null: clear it)
 * @param  ?TIME $end_date_time The end time (null: clear it)
 * @param  array $groups List of groups of which to limit the message (empty: no limit)
 * @param  array $page_links List of page links of which to limit the message (empty: no limit)
 */

function edit_site_message(int $id, string $title, string $message, string $type, int $validated = 1, ?int $start_date_time = null, ?int $end_date_time = null, array $groups = [], array $page_links = [])