Function __global->add_calendar_event
Definitions
sources/calendar2.php
- Add a calendar event.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: int
Parameters
Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
---|---|---|---|---|---|---|---|
$allow_trackbacks | BINARY | No | No | 1 | N/A | N/A | Whether the event may be trackbacked |
$notes | LONG_TEXT | No | No | Blank (empty string) | N/A | N/A | Hidden notes pertaining to the event |
$submitter | ?MEMBER | No | No | Null | N/A | N/A | The event submitter (null: current member) |
$views | integer | No | No | 0 | N/A | N/A | The number of views so far |
$add_time | ?TIME | No | No | Null | N/A | N/A | The add time (null: now) |
$edit_time | ?TIME | No | No | Null | N/A | N/A | The edit time (null: never) |
$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) |
$regions | array | No | No | [] | N/A | N/A | The regions (empty: not region-limited) |
Returns
- The ID of the event
- Type: AUTO_LINK
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Add a calendar event.
*
* @param BINARY $allow_trackbacks Whether the event may be trackbacked
* @param LONG_TEXT $notes Hidden notes pertaining to the event
* @param ?MEMBER $submitter The event submitter (null: current member)
* @param integer $views The number of views so far
* @param ?TIME $add_time The add time (null: now)
* @param ?TIME $edit_time The edit time (null: never)
* @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)
* @param array $regions The regions (empty: not region-limited)
* @return AUTO_LINK The ID of the event
*/
function add_calendar_event(int $allow_trackbacks = 1, string $notes = '', ?int $submitter = null, int $views = 0, ?int $add_time = null, ?int $edit_time = null, ?int $id = null, ?string $meta_keywords = '', ?string $meta_description = '', array $regions = []) : int
* Add a calendar event.
*
* @param BINARY $allow_trackbacks Whether the event may be trackbacked
* @param LONG_TEXT $notes Hidden notes pertaining to the event
* @param ?MEMBER $submitter The event submitter (null: current member)
* @param integer $views The number of views so far
* @param ?TIME $add_time The add time (null: now)
* @param ?TIME $edit_time The edit time (null: never)
* @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)
* @param array $regions The regions (empty: not region-limited)
* @return AUTO_LINK The ID of the event
*/
function add_calendar_event(int $allow_trackbacks = 1, string $notes = '', ?int $submitter = null, int $views = 0, ?int $add_time = null, ?int $edit_time = null, ?int $id = null, ?string $meta_keywords = '', ?string $meta_description = '', array $regions = []) : int