Function __global->add_award_type
Definitions
sources/awards2.php
- Make an award type.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$title | SHORT_TEXT | No | No | required parameter | N/A | N/A | The title |
$description | LONG_TEXT | No | No | required parameter | N/A | N/A | The description |
$points | integer | No | No | required parameter | N/A | N/A | How many points are given to the awardee |
$content_type | ID_TEXT | No | No | required parameter | N/A | N/A | The content type the award type is for |
$show_awardee | BINARY | No | No | required parameter | N/A | N/A | Whether to show the awardee when displaying this award |
$update_interval_hours | integer | No | No | required parameter | N/A | N/A | The approximate time in hours between awards (e.g. 168 for a week) |
Returns
- The ID
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Make an award type.
*
* @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
* @param integer $update_interval_hours The approximate time in hours between awards (e.g. 168 for a week)
* @return AUTO_LINK The ID
*/
function add_award_type(string $title, string $description, int $points, string $content_type, int $show_awardee, int $update_interval_hours) : int
* Make an award type.
*
* @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
* @param integer $update_interval_hours The approximate time in hours between awards (e.g. 168 for a week)
* @return AUTO_LINK The ID
*/
function add_award_type(string $title, string $description, int $points, string $content_type, int $show_awardee, int $update_interval_hours) : int