Function Module_admin_awards->get_form_fields

Definitions

adminzone/pages/modules/admin_awards.php

  • Get Tempcode for 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 award (null: not added yet)
$title SHORT_TEXT No No Blank (empty string) N/A N/A The title
$description LONG_TEXT No No Blank (empty string) N/A N/A The description
$points integer No No 0 N/A N/A How many points are given to the awardee
$content_type ID_TEXT No No download N/A N/A The content type the award type is for
$show_awardee ?BINARY No No Null N/A N/A Whether to show the awardee when displaying this award (null: statistical default)
$update_interval_hours integer No No 168 N/A N/A The approximate time in hours between awards (e.g. 168 for a week)

Returns

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

Preview

Code (PHP)

/**
 * Get Tempcode for adding/editing form.
 *
 * @param  ?AUTO_LINK $id The ID of the award (null: not added yet)
 * @param  SHORT_TEXT $title The title
 * @param  LONG_TEXT $description The description
 * @param  integer $points How many points are given to the awardee
 * @param  ID_TEXT $content_type The content type the award type is for
 * @param  ?BINARY $show_awardee Whether to show the awardee when displaying this award (null: statistical default)
 * @param  integer $update_interval_hours The approximate time in hours between awards (e.g. 168 for a week)
 * @return array A pair: The input fields, Hidden fields
 */

public function get_form_fields(?int $id = null, string $title = '', string $description = '', int $points = 0, string $content_type = 'download', ?int $show_awardee = null, int $update_interval_hours = 168) : array