Raw event retrieval strategy.
More...
|
| 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...
|
|
Raw event retrieval strategy.
This strategy is based on what used to be the calendar API's get_events function.
- Copyright
- 2017 Cameron Ball camer.nosp@m.on@c.nosp@m.amero.nosp@m.n172.nosp@m.9.xyz
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ 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 | $usersfilter | Array of users to retrieve events for. |
array | null | $groupsfilter | Array of groups to retrieve events for. |
array | null | $coursesfilter | Array of courses to retrieve events for. |
array | null | $categoriesfilter | Array of categories to retrieve events for. |
array | null | $whereconditions | Array of where conditions to restrict results. |
array | null | $whereparams | Array of parameters for $whereconditions. |
string | null | $ordersql | SQL to order results. |
int | null | $offset | Amount to offset results by. |
int | $limitnum | Return at most this many results. |
bool | $ignorehidden | True 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 | $users | array of users, user id or boolean for all/no user events |
array | int | boolean | $groups | array of groups, group id or boolean for all/no group events |
array | int | boolean | $courses | array of courses, course id or boolean for all/no course events |
string | $whereconditions | The conditions in the WHERE clause. |
array | $whereparams | The parameters for the WHERE clause. |
string | $ordersql | The ORDER BY clause. |
int | $offset | Offset. |
int | $limitnum | Limit. |
boolean | $ignorehidden | whether to select only visible events or all events |
- Return values
-
array::$events | of 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: