Function __global->calendar_matches

Definitions

sources/calendar.php

  • Detect calendar matches in a time period, in user-time.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$auth_member_id MEMBER No No required parameter N/A N/A The member we are running authentication against
$member_id MEMBER No No required parameter N/A N/A The member to detect matches for
$restrict boolean No No required parameter N/A N/A Whether to restrict only to viewable events for the current member (rarely pass this as false!)
$period_start ?TIME No No required parameter N/A N/A The timestamp that found times must exceed. In user-time (null: use find_periods_recurrence default)
$period_end ?TIME No No required parameter N/A N/A The timestamp that found times must not exceed. In user-time (null: use find_periods_recurrence default)
$filter ?array No No Null N/A N/A The type filter, as used by the calendar module internally (null: no filter)
$do_rss boolean No No True N/A N/A Whether to include RSS/iCal events in the results
$private ?BINARY No No Null N/A N/A Whether to show private events (1) or public events (0) (null: both public and private)
$check_perms boolean No No True N/A N/A Whether to check permissions
$now_anchored_window boolean No No False N/A N/A Whether the time window is primarily anchored around the current time, allowing us to use e_previous_recurrence_time/e_next_recurrence_time to limit event search scope

Returns

  • A list of events happening, with time details
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Detect calendar matches in a time period, in user-time.
 *
 * @param  MEMBER $auth_member_id The member we are running authentication against
 * @param  MEMBER $member_id The member to detect matches for
 * @param  boolean $restrict Whether to restrict only to viewable events for the current member (rarely pass this as false!)
 * @param  ?TIME $period_start The timestamp that found times must exceed. In user-time (null: use find_periods_recurrence default)
 * @param  ?TIME $period_end The timestamp that found times must not exceed. In user-time (null: use find_periods_recurrence default)
 * @param  ?array $filter The type filter, as used by the calendar module internally (null: no filter)
 * @param  boolean $do_rss Whether to include RSS/iCal events in the results
 * @param  ?BINARY $private Whether to show private events (1) or public events (0) (null: both public and private)
 * @param  boolean $check_perms Whether to check permissions
 * @param  boolean $now_anchored_window Whether the time window is primarily anchored around the current time, allowing us to use e_previous_recurrence_time/e_next_recurrence_time to limit event search scope
 * @return array A list of events happening, with time details
 */

function calendar_matches(int $auth_member_id, int $member_id, bool $restrict, ?int $period_start, ?int $period_end, ?array $filter = null, bool $do_rss = true, ?int $private = null, bool $check_perms = true, bool $now_anchored_window = false) : array