Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | List of all members
core_calendar\local\event\strategies\raw_event_retrieval_strategy Class Reference

Raw event retrieval strategy. More...

Inheritance diagram for core_calendar\local\event\strategies\raw_event_retrieval_strategy:
core_calendar\local\event\strategies\raw_event_retrieval_strategy_interface

Public Member Functions

 get_raw_events (array $usersfilter=null, array $groupsfilter=null, array $coursesfilter=null, array $categoriesfilter=null, array $whereconditions=null, array $whereparams=null, $ordersql=null, $offset=null, $limitnum=null, $ignorehidden=true)
 Retrieve raw calendar event records from the DB. More...
 

Protected Member Functions

 get_raw_events_legacy_implementation ( $users, $groups, $courses, $categories, $whereconditions, $whereparams, $ordersql, $offset, $limitnum, $ignorehidden)
 The legacy implementation with minor tweaks. More...
 

Detailed Description

Raw event retrieval strategy.

This strategy is based on what used to be the calendar API's get_events function.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ get_raw_events()

core_calendar\local\event\strategies\raw_event_retrieval_strategy::get_raw_events ( array  $usersfilter = null,
array  $groupsfilter = null,
array  $coursesfilter = null,
array  $categoriesfilter = null,
array  $whereconditions = null,
array  $whereparams = null,
  $ordersql = null,
  $offset = null,
  $limitnum = null,
  $ignorehidden = true 
)

Retrieve raw calendar event records from the DB.

Parameters
array | null$usersfilterArray of users to retrieve events for.
array | null$groupsfilterArray of groups to retrieve events for.
array | null$coursesfilterArray of courses to retrieve events for.
array | null$categoriesfilterArray of categories to retrieve events for.
array | null$whereconditionsArray of where conditions to restrict results.
array | null$whereparamsArray of parameters for $whereconditions.
string | null$ordersqlSQL to order results.
int | null$offsetAmount to offset results by.
int$limitnumReturn at most this many results.
bool$ignorehiddenTrue to ignore hidden events. False to include them.
Return values
stdClass[]Array of event records.

Implements core_calendar\local\event\strategies\raw_event_retrieval_strategy_interface.

◆ get_raw_events_legacy_implementation()

core_calendar\local\event\strategies\raw_event_retrieval_strategy::get_raw_events_legacy_implementation (   $users,
  $groups,
  $courses,
  $categories,
  $whereconditions,
  $whereparams,
  $ordersql,
  $offset,
  $limitnum,
  $ignorehidden 
)
protected

The legacy implementation with minor tweaks.

Parameters
array | int | boolean$usersarray of users, user id or boolean for all/no user events
array | int | boolean$groupsarray of groups, group id or boolean for all/no group events
array | int | boolean$coursesarray of courses, course id or boolean for all/no course events
string$whereconditionsThe conditions in the WHERE clause.
array$whereparamsThe parameters for the WHERE clause.
string$ordersqlThe ORDER BY clause.
int$offsetOffset.
int$limitnumLimit.
boolean$ignorehiddenwhether to select only visible events or all events
Return values
array::$eventsof selected events or an empty array if there aren't any (or there was an error)

The documentation for this class was generated from the following file: