Function __global->actual_add_catalogue_entry
Definitions
sources/catalogues2.php
- Adds an entry to the specified catalogue.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$category_id | AUTO_LINK | No | No | required parameter | N/A | N/A | The ID of the category that the entry is in |
$validated | BINARY | No | No | required parameter | N/A | N/A | Whether the entry has been validated |
$notes | LONG_TEXT | No | No | required parameter | N/A | N/A | Hidden notes pertaining to the entry |
$allow_rating | BINARY | No | No | required parameter | N/A | N/A | Whether the entry may be rated |
$allow_comments | SHORT_INTEGER | No | No | required parameter | N/A | N/A | Whether comments are allowed (0=no, 1=yes, 2=review style) |
$allow_trackbacks | BINARY | No | No | required parameter | N/A | N/A | Whether the entry may be trackbacked |
$map | array | No | No | required parameter | N/A | N/A | A map of field IDs, to values, that defines the entries settings |
$time | ?TIME | No | No | Null | N/A | N/A | The time the entry was added (null: now) |
$submitter | ?MEMBER | No | No | Null | N/A | N/A | The entries submitter (null: current user) |
$edit_date | ?TIME | No | No | Null | N/A | N/A | The edit time (null: never) |
$views | integer | No | No | 0 | N/A | N/A | The number of views |
$id | ?AUTO_LINK | No | No | Null | N/A | N/A | Force an ID (null: don't force an ID) |
$meta_keywords | ?SHORT_TEXT | No | No | Blank (empty string) | N/A | N/A | Meta keywords for this resource (null: do not edit) (blank: implicit) |
$meta_description | ?LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Meta description for this resource (null: do not edit) (blank: implicit) |
Returns
- The ID of the newly added entry
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Adds an entry to the specified catalogue.
*
* @param AUTO_LINK $category_id The ID of the category that the entry is in
* @param BINARY $validated Whether the entry has been validated
* @param LONG_TEXT $notes Hidden notes pertaining to the entry
* @param BINARY $allow_rating Whether the entry may be rated
* @param SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style)
* @param BINARY $allow_trackbacks Whether the entry may be trackbacked
* @param array $map A map of field IDs, to values, that defines the entries settings
* @param ?TIME $time The time the entry was added (null: now)
* @param ?MEMBER $submitter The entries submitter (null: current user)
* @param ?TIME $edit_date The edit time (null: never)
* @param integer $views The number of views
* @param ?AUTO_LINK $id Force an ID (null: don't force an ID)
* @param ?SHORT_TEXT $meta_keywords Meta keywords for this resource (null: do not edit) (blank: implicit)
* @param ?LONG_TEXT $meta_description Meta description for this resource (null: do not edit) (blank: implicit)
* @return AUTO_LINK The ID of the newly added entry
*/
function actual_add_catalogue_entry(int $category_id, int $validated, string $notes, int $allow_rating, int $allow_comments, int $allow_trackbacks, array $map, ?int $time = null, ?int $submitter = null, ?int $edit_date = null, int $views = 0, ?int $id = null, ?string $meta_keywords = '', ?string $meta_description = '') : int
* Adds an entry to the specified catalogue.
*
* @param AUTO_LINK $category_id The ID of the category that the entry is in
* @param BINARY $validated Whether the entry has been validated
* @param LONG_TEXT $notes Hidden notes pertaining to the entry
* @param BINARY $allow_rating Whether the entry may be rated
* @param SHORT_INTEGER $allow_comments Whether comments are allowed (0=no, 1=yes, 2=review style)
* @param BINARY $allow_trackbacks Whether the entry may be trackbacked
* @param array $map A map of field IDs, to values, that defines the entries settings
* @param ?TIME $time The time the entry was added (null: now)
* @param ?MEMBER $submitter The entries submitter (null: current user)
* @param ?TIME $edit_date The edit time (null: never)
* @param integer $views The number of views
* @param ?AUTO_LINK $id Force an ID (null: don't force an ID)
* @param ?SHORT_TEXT $meta_keywords Meta keywords for this resource (null: do not edit) (blank: implicit)
* @param ?LONG_TEXT $meta_description Meta description for this resource (null: do not edit) (blank: implicit)
* @return AUTO_LINK The ID of the newly added entry
*/
function actual_add_catalogue_entry(int $category_id, int $validated, string $notes, int $allow_rating, int $allow_comments, int $allow_trackbacks, array $map, ?int $time = null, ?int $submitter = null, ?int $edit_date = null, int $views = 0, ?int $id = null, ?string $meta_keywords = '', ?string $meta_description = '') : int