Class to providing the related objects when exporting a list of calendar events.
More...
|
| load_courses () |
| Load the list of all of the distinct courses required for the list of provided events and save the result in memory.
|
|
| load_groups () |
| Load the list of all of the distinct groups required for the list of provided events and save the result in memory.
|
|
| load_module_instances () |
| Load the list of all of the distinct module instances required for the list of provided events and save the result in memory.
|
|
|
array | $coursemodules = [] |
| $coursemodules The related course modules.
|
|
array | $courses = null |
| $courses The related courses.
|
|
array | $events |
| $events The events for which we need related objects.
|
|
array | $groups = null |
| $groups The related groups.
|
|
array | $moduleinstances = null |
| $moduleinstances The related module instances.
|
|
Class to providing the related objects when exporting a list of calendar events.
This class is only meant for use with exporters. It attempts to bulk load the related objects for a list of events and cache them to avoid having to query the database when exporting each individual event.
- Copyright
- 2017 Ryan Wyllie ryan@.nosp@m.mood.nosp@m.le.co.nosp@m.m
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_calendar\external\events_related_objects_cache::__construct |
( |
array |
$events, |
|
|
array |
$courses = null |
|
) |
| |
Constructor.
- Parameters
-
array | $events | Array of event_interface events |
array | $courses | Array of courses to populate the cache with |
◆ get_context()
core_calendar\external\events_related_objects_cache::get_context |
( |
event_interface |
$event | ) |
|
Get the related context for a given event.
- Parameters
-
event_interface | $event | The event object. |
- Return values
-
◆ get_course()
core_calendar\external\events_related_objects_cache::get_course |
( |
event_interface |
$event | ) |
|
Get the related course object for a given event.
- Parameters
-
event_interface | $event | The event object. |
- Return values
-
◆ get_course_module()
core_calendar\external\events_related_objects_cache::get_course_module |
( |
event_interface |
$event | ) |
|
Get the related course module for a given event.
- Parameters
-
event_interface | $event | The event object. |
- Return values
-
◆ get_group()
core_calendar\external\events_related_objects_cache::get_group |
( |
event_interface |
$event | ) |
|
Get the related group object for a given event.
- Parameters
-
event_interface | $event | The event object. |
- Return values
-
◆ get_module_instance()
core_calendar\external\events_related_objects_cache::get_module_instance |
( |
event_interface |
$event | ) |
|
Get the related module instance for a given event.
- Parameters
-
event_interface | $event | The event object. |
- Return values
-
The documentation for this class was generated from the following file: