Function __global->actual_add_catalogue
Definitions
sources/catalogues2.php
- Add a catalogue using all the specified values.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$name | ID_TEXT | No | No | required parameter | N/A | N/A | The codename of the catalogue |
$title | mixed | No | No | required parameter | N/A | N/A | The title of the catalogue (either language string map or string) |
$description | mixed | No | No | required parameter | N/A | N/A | A description (either language string map or string) |
$display_type | SHORT_INTEGER | No | No | required parameter | N/A | N/A | The display type |
$is_tree | BINARY | No | No | required parameter | N/A | N/A | Whether the catalogue uses a tree system (as opposed to mere categories in an index) |
$notes | LONG_TEXT | No | No | required parameter | N/A | N/A | Hidden notes pertaining to this catalogue |
$submit_points | integer | No | No | required parameter | N/A | N/A | How many points a member gets by submitting to this catalogue |
$ecommerce | BINARY | No | No | 0 | N/A | N/A | Whether the catalogue is an eCommerce catalogue |
$categories_sort_order | SHORT_TEXT | No | No | title ASC | "title ASC" "recent ASC" "recent DESC" | N/A | Category sort order |
$send_view_reports | ID_TEXT | No | No | never | never daily weekly monthly quarterly | N/A | How to send view reports |
$default_review_freq | ?integer | No | No | Null | N/A | N/A | Default review frequency for catalogue entries (null: none) |
$add_time | ?TIME | No | No | Null | N/A | N/A | The add time (null: now) |
$uniqify | boolean | No | No | False | N/A | N/A | Whether to force the name as unique, if there's a conflict |
Returns
- The name
- Type: ID_TEXT
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a catalogue using all the specified values.
*
* @param ID_TEXT $name The codename of the catalogue
* @param mixed $title The title of the catalogue (either language string map or string)
* @param mixed $description A description (either language string map or string)
* @param SHORT_INTEGER $display_type The display type
* @param BINARY $is_tree Whether the catalogue uses a tree system (as opposed to mere categories in an index)
* @param LONG_TEXT $notes Hidden notes pertaining to this catalogue
* @param integer $submit_points How many points a member gets by submitting to this catalogue
* @param BINARY $ecommerce Whether the catalogue is an eCommerce catalogue
* @param SHORT_TEXT $categories_sort_order Category sort order
* @set "title ASC" "recent ASC" "recent DESC"
* @param ID_TEXT $send_view_reports How to send view reports
* @set never daily weekly monthly quarterly
* @param ?integer $default_review_freq Default review frequency for catalogue entries (null: none)
* @param ?TIME $add_time The add time (null: now)
* @param boolean $uniqify Whether to force the name as unique, if there's a conflict
* @return ID_TEXT The name
*/
function actual_add_catalogue(string $name, $title, $description, int $display_type, int $is_tree, string $notes, int $submit_points, int $ecommerce = 0, string $categories_sort_order = 'title ASC', string $send_view_reports = 'never', ?int $default_review_freq = null, ?int $add_time = null, bool $uniqify = false) : string
* Add a catalogue using all the specified values.
*
* @param ID_TEXT $name The codename of the catalogue
* @param mixed $title The title of the catalogue (either language string map or string)
* @param mixed $description A description (either language string map or string)
* @param SHORT_INTEGER $display_type The display type
* @param BINARY $is_tree Whether the catalogue uses a tree system (as opposed to mere categories in an index)
* @param LONG_TEXT $notes Hidden notes pertaining to this catalogue
* @param integer $submit_points How many points a member gets by submitting to this catalogue
* @param BINARY $ecommerce Whether the catalogue is an eCommerce catalogue
* @param SHORT_TEXT $categories_sort_order Category sort order
* @set "title ASC" "recent ASC" "recent DESC"
* @param ID_TEXT $send_view_reports How to send view reports
* @set never daily weekly monthly quarterly
* @param ?integer $default_review_freq Default review frequency for catalogue entries (null: none)
* @param ?TIME $add_time The add time (null: now)
* @param boolean $uniqify Whether to force the name as unique, if there's a conflict
* @return ID_TEXT The name
*/
function actual_add_catalogue(string $name, $title, $description, int $display_type, int $is_tree, string $notes, int $submit_points, int $ecommerce = 0, string $categories_sort_order = 'title ASC', string $send_view_reports = 'never', ?int $default_review_freq = null, ?int $add_time = null, bool $uniqify = false) : string