Function Module_cms_galleries->get_form_fields

Definitions

cms/pages/modules/cms_galleries.php

  • Get Tempcode for an image 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 image (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 image description
$url URLPATH No No Blank (empty string) N/A N/A URL to the image
$validated BINARY No No 1 N/A N/A Image validation status
$validation_time ?TIME No No Null N/A N/A The time on which this content should be validated (null: do not schedule)
$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 image
$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 an image adding/editing form.
 *
 * @param  ?AUTO_LINK $id The ID of the image (null: new)
 * @param  SHORT_TEXT $title The title
 * @param  ID_TEXT $cat The gallery
 * @param  LONG_TEXT $description The image description
 * @param  URLPATH $url URL to the image
 * @param  BINARY $validated Image validation status
 * @param  ?TIME $validation_time The time on which this content should be validated (null: do not schedule)
 * @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 image
 * @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 = '', int $validated = 1, ?int $validation_time = null, ?int $allow_rating = null, ?int $allow_comments = null, ?int $allow_trackbacks = null, string $notes = '', array $regions = []) : array