Differences Between: [Versions 310 and 402] [Versions 311 and 402] [Versions 39 and 402] [Versions 400 and 402] [Versions 401 and 402]
Contains event class for providing the related objects when exporting a list of calendar events.
Copyright: | 2017 Ryan Wyllie <ryan@moodle.com> |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 288 lines (9 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
events_related_objects_cache:: (9 methods):
__construct()
get_course()
get_context()
get_group()
get_course_module()
get_module_instance()
load_courses()
load_groups()
load_module_instances()
Class: events_related_objects_cache - X-Ref
Class to providing the related objects when exporting a list of calendar events.__construct(array $events, array $courses = null) X-Ref |
Constructor. param: array $events Array of event_interface events param: array $courses Array of courses to populate the cache with |
get_course(event_interface $event) X-Ref |
Get the related course object for a given event. param: event_interface $event The event object. return: \stdClass|null |
get_context(event_interface $event) X-Ref |
Get the related context for a given event. param: event_interface $event The event object. return: \context|null |
get_group(event_interface $event) X-Ref |
Get the related group object for a given event. param: event_interface $event The event object. return: \stdClass|null |
get_course_module(event_interface $event) X-Ref |
Get the related course module for a given event. param: event_interface $event The event object. return: \stdClass|null |
get_module_instance(event_interface $event) X-Ref |
Get the related module instance for a given event. param: event_interface $event The event object. return: \stdClass|null |
load_courses() X-Ref |
Load the list of all of the distinct courses required for the list of provided events and save the result in memory. |
load_groups() X-Ref |
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() X-Ref |
Load the list of all of the distinct module instances required for the list of provided events and save the result in memory. |