Function Module_cms_calendar->get_form_fields

Definitions

cms/pages/modules/cms_calendar.php

  • Get the form fields for an event input 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
$allow_rating ?BINARY No No Null N/A N/A Whether rating is allowed (null: decide statistically, based on existing choices)
$allow_comments ?SHORT_INTEGER No No Null N/A N/A Whether comments are allowed (0=no, 1=yes, 2=review style) (null: decide statistically, based on existing choices)
$allow_trackbacks ?BINARY No No Null N/A N/A Whether trackbacks are allowed (null: decide statistically, based on existing choices)
$notes LONG_TEXT No No Blank (empty string) N/A N/A Notes
$regions array No No [] N/A N/A The regions (empty: not region-limited)

Returns

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

Preview

Code (PHP)

/**
 * Get the form fields for an event input form.
 *
 * @param  ?BINARY $allow_rating Whether rating is allowed (null: decide statistically, based on existing choices)
 * @param  ?SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style) (null: decide statistically, based on existing choices)
 * @param  ?BINARY $allow_trackbacks Whether trackbacks are allowed (null: decide statistically, based on existing choices)
 * @param  LONG_TEXT $notes Notes
 * @param  array $regions The regions (empty: not region-limited)
 * @return array A tuple: The input fields, Hidden fields, ...
 */

public function get_form_fields(?int $allow_rating = null, ?int $allow_comments = null, ?int $allow_trackbacks = null, string $notes = '', array $regions = []) : array