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
$id ?AUTO_LINK No No Null N/A N/A The event ID (null: new)
$type ?AUTO_LINK No No Null N/A N/A The event type (null: default)
$start_year ?integer No No Null N/A N/A The year the event starts at (null: default)
$start_month ?integer No No Null N/A N/A The month the event starts at (null: default)
$start_day ?integer No No Null N/A N/A The day the event starts at (null: default)
$start_monthly_spec_type ID_TEXT No No day_of_month day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards N/A In-month specification type for start date
$start_hour ?integer No No Null N/A N/A The hour the event starts at (null: default)
$start_minute ?integer No No Null N/A N/A The minute the event starts at (null: default)
$title SHORT_TEXT No No Blank (empty string) N/A N/A The title of the event
$content LONG_TEXT No No Blank (empty string) N/A N/A The full text describing the event
$recurrence SHORT_TEXT No No none N/A N/A The recurrence code
$recurrences ?integer No No Null N/A N/A The number of recurrences (null: none/infinite)
$seg_recurrences BINARY No No 0 N/A N/A Whether to segregate the comment-topics/rating/trackbacks per-recurrence
$priority integer No No 3 N/A 1 5 The priority
$end_year ?integer No No Null N/A N/A The year the event ends at (null: not a multi day event)
$end_month ?integer No No Null N/A N/A The month the event ends at (null: not a multi day event)
$end_day ?integer No No Null N/A N/A The day the event ends at (null: not a multi day event)
$end_monthly_spec_type ID_TEXT No No day_of_month day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards N/A In-month specification type for end date
$end_hour ?integer No No Null N/A N/A The hour the event ends at (null: not a multi day event)
$end_minute ?integer No No Null N/A N/A The minute the event ends at (null: not a multi day event)
$timezone ?ID_TEXT No No Null N/A N/A The timezone for the event (null: current user's timezone)
$do_timezone_conv BINARY No No 0 N/A N/A Whether the time should be presented in the viewer's own timezone
$member_calendar ?MEMBER No No Null N/A N/A The member's calendar it will be on (null: not on a specific member's calendar)
$validated BINARY No No 1 N/A N/A Whether the event is validated
$validation_time ?TIME No No Null N/A N/A The time on which this content should be validated (null: do not schedule)

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  ?AUTO_LINK $id The event ID (null: new)
 * @param  ?AUTO_LINK $type The event type (null: default)
 * @param  ?integer $start_year The year the event starts at (null: default)
 * @param  ?integer $start_month The month the event starts at (null: default)
 * @param  ?integer $start_day The day the event starts at (null: default)
 * @param  ID_TEXT $start_monthly_spec_type In-month specification type for start date
 * @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
 * @param  ?integer $start_hour The hour the event starts at (null: default)
 * @param  ?integer $start_minute The minute the event starts at (null: default)
 * @param  SHORT_TEXT $title The title of the event
 * @param  LONG_TEXT $content The full text describing the event
 * @param  SHORT_TEXT $recurrence The recurrence code
 * @param  ?integer $recurrences The number of recurrences (null: none/infinite)
 * @param  BINARY $seg_recurrences Whether to segregate the comment-topics/rating/trackbacks per-recurrence
 * @param  integer $priority The priority
 * @range 1 5
 * @param  ?integer $end_year The year the event ends at (null: not a multi day event)
 * @param  ?integer $end_month The month the event ends at (null: not a multi day event)
 * @param  ?integer $end_day The day the event ends at (null: not a multi day event)
 * @param  ID_TEXT $end_monthly_spec_type In-month specification type for end date
 * @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
 * @param  ?integer $end_hour The hour the event ends at (null: not a multi day event)
 * @param  ?integer $end_minute The minute the event ends at (null: not a multi day event)
 * @param  ?ID_TEXT $timezone The timezone for the event (null: current user's timezone)
 * @param  BINARY $do_timezone_conv Whether the time should be presented in the viewer's own timezone
 * @param  ?MEMBER $member_calendar The member's calendar it will be on (null: not on a specific member's calendar)
 * @param  BINARY $validated Whether the event is validated
 * @param  ?TIME $validation_time The time on which this content should be validated (null: do not schedule)
 * @return array A tuple: The input fields, Hidden fields, ...
 */

public function get_form_fields(?int $id = null, ?int $type = null, ?int $start_year = null, ?int $start_month = null, ?int $start_day = null, string $start_monthly_spec_type = 'day_of_month', ?int $start_hour = null, ?int $start_minute = null, string $title = '', string $content = '', string $recurrence = 'none', ?int $recurrences = null, int $seg_recurrences = 0, int $priority = 3, ?int $end_year = null, ?int $end_month = null, ?int $end_day = null, string $end_monthly_spec_type = 'day_of_month', ?int $end_hour = null, ?int $end_minute = null, ?string $timezone = null, int $do_timezone_conv = 0, ?int $member_calendar = null, int $validated = 1, ?int $validation_time = null) : array