Function Module_cms_galleries_alt->get_form_fields

Definitions

cms/pages/modules/cms_galleries.php

  • Get Tempcode for a video adding/editing 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 ID of the video (null: new)
$title SHORT_TEXT No No Blank (empty string) N/A N/A The title
$cat ID_TEXT No No Blank (empty string) N/A N/A The gallery
$description LONG_TEXT No No Blank (empty string) N/A N/A The video description
$url URLPATH No No Blank (empty string) N/A N/A The URL to the video file (blank: not yet added)
$thumb_url URLPATH No No Blank (empty string) N/A N/A The URL to the thumbnail
$validated BINARY No No 1 N/A N/A Video validation status
$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 for the video
$video_length ?integer No No Null N/A N/A The length of the video (null: not yet added, so not yet known)
$video_width ?integer No No Null N/A N/A The width of the video (null: not yet added, so not yet known)
$video_height ?integer No No Null N/A N/A The height of the video (null: not yet added, so not yet known)
$closed_captions_url URLPATH No No Blank (empty string) N/A N/A The URL to the closed captions for this video
$regions array No No [] N/A N/A The regions (empty: not region-limited)

Returns

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

Preview

Code (PHP)

/**
 * Get Tempcode for a video adding/editing form.
 *
 * @param  ?AUTO_LINK $id The ID of the video (null: new)
 * @param  SHORT_TEXT $title The title
 * @param  ID_TEXT $cat The gallery
 * @param  LONG_TEXT $description The video description
 * @param  URLPATH $url The URL to the video file (blank: not yet added)
 * @param  URLPATH $thumb_url The URL to the thumbnail
 * @param  BINARY $validated Video validation status
 * @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 for the video
 * @param  ?integer $video_length The length of the video (null: not yet added, so not yet known)
 * @param  ?integer $video_width The width of the video (null: not yet added, so not yet known)
 * @param  ?integer $video_height The height of the video (null: not yet added, so not yet known)
 * @param  URLPATH $closed_captions_url The URL to the closed captions for this video
 * @param  array $regions The regions (empty: not region-limited)
 * @return array A pair: The input fields, Hidden fields
 */

public function get_form_fields(?int $id = null, string $title = '', string $cat = '', string $description = '', string $url = '', string $thumb_url = '', int $validated = 1, ?int $allow_rating = null, ?int $allow_comments = null, ?int $allow_trackbacks = null, string $notes = '', ?int $video_length = null, ?int $video_width = null, ?int $video_height = null, string $closed_captions_url = '', array $regions = []) : array