Function __global->get_chatroom_fields

Definitions

sources/chat2.php

  • Get form fields for adding/editing a chatroom.
  • 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 chatroom ID (null: new)
$is_made_by_me boolean No No False N/A N/A Whether the room is being made as a private room by the current member
$room_name SHORT_TEXT No No Blank (empty string) N/A N/A The room name
$welcome LONG_TEXT No No Blank (empty string) N/A N/A The welcome message
$username SHORT_TEXT No No Blank (empty string) N/A N/A The owner username
$allow2 LONG_TEXT No No Blank (empty string) N/A N/A The comma-separated list of users that may access it (blank: no restriction)
$allow2_groups LONG_TEXT No No Blank (empty string) N/A N/A The comma-separated list of usergroups that may access it (blank: no restriction)
$disallow2 LONG_TEXT No No Blank (empty string) N/A N/A The comma-separated list of users that may NOT access it (blank: no restriction)
$disallow2_groups LONG_TEXT No No Blank (empty string) N/A N/A The comma-separated list of usergroups that may NOT access it (blank: no restriction)

Returns

  • A pair: The input fields, Hidden fields
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get form fields for adding/editing a chatroom.
 *
 * @param  ?AUTO_LINK $id The chatroom ID (null: new)
 * @param  boolean $is_made_by_me Whether the room is being made as a private room by the current member
 * @param  SHORT_TEXT $room_name The room name
 * @param  LONG_TEXT $welcome The welcome message
 * @param  SHORT_TEXT $username The owner username
 * @param  LONG_TEXT $allow2 The comma-separated list of users that may access it (blank: no restriction)
 * @param  LONG_TEXT $allow2_groups The comma-separated list of usergroups that may access it (blank: no restriction)
 * @param  LONG_TEXT $disallow2 The comma-separated list of users that may NOT access it (blank: no restriction)
 * @param  LONG_TEXT $disallow2_groups The comma-separated list of usergroups that may NOT access it (blank: no restriction)
 * @return array A pair: The input fields, Hidden fields
 */

function get_chatroom_fields(?int $id = null, bool $is_made_by_me = false, string $room_name = '', string $welcome = '', string $username = '', string $allow2 = '', string $allow2_groups = '', string $disallow2 = '', string $disallow2_groups = '') : array