Function __global->detect_conflicts
Definitions
sources/calendar.php
- Detect conflicts with an event at a certain time.NB: Only detects future conflicts, not conflicts on past scheduling.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: object
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $member_id | MEMBER | No | No | required parameter | N/A | N/A | The member to detect conflicts for |
| $skip_id | ?AUTO_LINK | No | No | required parameter | N/A | N/A | The event ID that we are detecting conflicts with (we need this so we don't think we conflict with ourself) (null: not added yet) |
| $start_year | ?integer | No | No | required parameter | N/A | N/A | The year the event starts at. This and the below are in server time (null: default) |
| $start_month | ?integer | No | No | required parameter | N/A | N/A | The month the event starts at (null: default) |
| $start_day | ?integer | No | No | required parameter | N/A | N/A | The day the event starts at (null: default) |
| $start_monthly_spec_type | ID_TEXT | No | No | required parameter | day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards | N/A | In-month specification type for start date |
| $start_hour | ?integer | No | No | required parameter | N/A | N/A | The hour the event starts at (null: default) |
| $start_minute | ?integer | No | No | required parameter | N/A | N/A | The minute the event starts at (null: default) |
| $end_year | ?integer | No | No | required parameter | N/A | N/A | The year the event ends at (null: not a multi day event) |
| $end_month | ?integer | No | No | required parameter | N/A | N/A | The month the event ends at (null: not a multi day event) |
| $end_day | ?integer | No | No | required parameter | N/A | N/A | The day the event ends at (null: not a multi day event) |
| $end_monthly_spec_type | ID_TEXT | No | No | required parameter | day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards | N/A | In-month specification type for end date |
| $end_hour | ?integer | No | No | required parameter | N/A | N/A | The hour the event ends at (null: not a multi day event) |
| $end_minute | ?integer | No | No | required parameter | N/A | N/A | The minute the event ends at (null: not a multi day event) |
| $recurrence | string | No | No | required parameter | N/A | N/A | The event recurrence |
| $recurrences | ?integer | No | No | required parameter | N/A | N/A | The number of recurrences (null: none/infinite) |
| $type | AUTO_LINK | No | No | required parameter | N/A | N/A | The event type |
| $member_calendar | ?MEMBER | No | No | required parameter | N/A | N/A | The member calendar (null: none) |
| $scope_type | integer | No | No | required parameter | N/A | N/A | The scope type, DETECT_CONFLICT_SCOPE_* |
Returns
- Information about conflicts (null: none)
- Type: ?Tempcode
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Detect conflicts with an event at a certain time.NB: Only detects future conflicts, not conflicts on past scheduling.
*
* @param MEMBER $member_id The member to detect conflicts for
* @param ?AUTO_LINK $skip_id The event ID that we are detecting conflicts with (we need this so we don't think we conflict with ourself) (null: not added yet)
* @param ?integer $start_year The year the event starts at. This and the below are in server time (null: default)
* @param ?integer $start_month The month the event starts at (null: default)
* @param ?integer $start_day The day the event starts at (null: default)
* @param ID_TEXT $start_monthly_spec_type In-month specification type for start date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $start_hour The hour the event starts at (null: default)
* @param ?integer $start_minute The minute the event starts at (null: default)
* @param ?integer $end_year The year the event ends at (null: not a multi day event)
* @param ?integer $end_month The month the event ends at (null: not a multi day event)
* @param ?integer $end_day The day the event ends at (null: not a multi day event)
* @param ID_TEXT $end_monthly_spec_type In-month specification type for end date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $end_hour The hour the event ends at (null: not a multi day event)
* @param ?integer $end_minute The minute the event ends at (null: not a multi day event)
* @param string $recurrence The event recurrence
* @param ?integer $recurrences The number of recurrences (null: none/infinite)
* @param AUTO_LINK $type The event type
* @param ?MEMBER $member_calendar The member calendar (null: none)
* @param integer $scope_type The scope type, DETECT_CONFLICT_SCOPE_*
* @return ?Tempcode Information about conflicts (null: none)
*/
function detect_conflicts(int $member_id, ?int $skip_id, ?int $start_year, ?int $start_month, ?int $start_day, string $start_monthly_spec_type, ?int $start_hour, ?int $start_minute, ?int $end_year, ?int $end_month, ?int $end_day, string $end_monthly_spec_type, ?int $end_hour, ?int $end_minute, string $recurrence, ?int $recurrences, int $type, ?int $member_calendar, int $scope_type) : ?object
* Detect conflicts with an event at a certain time.NB: Only detects future conflicts, not conflicts on past scheduling.
*
* @param MEMBER $member_id The member to detect conflicts for
* @param ?AUTO_LINK $skip_id The event ID that we are detecting conflicts with (we need this so we don't think we conflict with ourself) (null: not added yet)
* @param ?integer $start_year The year the event starts at. This and the below are in server time (null: default)
* @param ?integer $start_month The month the event starts at (null: default)
* @param ?integer $start_day The day the event starts at (null: default)
* @param ID_TEXT $start_monthly_spec_type In-month specification type for start date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $start_hour The hour the event starts at (null: default)
* @param ?integer $start_minute The minute the event starts at (null: default)
* @param ?integer $end_year The year the event ends at (null: not a multi day event)
* @param ?integer $end_month The month the event ends at (null: not a multi day event)
* @param ?integer $end_day The day the event ends at (null: not a multi day event)
* @param ID_TEXT $end_monthly_spec_type In-month specification type for end date
* @set day_of_month day_of_month_backwards dow_of_month dow_of_month_backwards
* @param ?integer $end_hour The hour the event ends at (null: not a multi day event)
* @param ?integer $end_minute The minute the event ends at (null: not a multi day event)
* @param string $recurrence The event recurrence
* @param ?integer $recurrences The number of recurrences (null: none/infinite)
* @param AUTO_LINK $type The event type
* @param ?MEMBER $member_calendar The member calendar (null: none)
* @param integer $scope_type The scope type, DETECT_CONFLICT_SCOPE_*
* @return ?Tempcode Information about conflicts (null: none)
*/
function detect_conflicts(int $member_id, ?int $skip_id, ?int $start_year, ?int $start_month, ?int $start_day, string $start_monthly_spec_type, ?int $start_hour, ?int $start_minute, ?int $end_year, ?int $end_month, ?int $end_day, string $end_monthly_spec_type, ?int $end_hour, ?int $end_minute, string $recurrence, ?int $recurrences, int $type, ?int $member_calendar, int $scope_type) : ?object

