Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_calendar\external\events_exporter Class Reference

Class for displaying a list of calendar events. More...

Inheritance diagram for core_calendar\external\events_exporter:
core_calendar\external\events_same_course_exporter

Public Member Functions

 __construct (array $events, $related=[])
 Constructor.
 

Protected Member Functions

 get_other_values (renderer_base $output)
 Get the additional values to inject while exporting.
 

Static Protected Member Functions

static define_other_properties ()
 Return the list of additional properties.
 
static define_related ()
 Returns a list of objects that are related.
 

Protected Attributes

array $events
 $events An array of event_interface objects.
 

Detailed Description

Class for displaying a list of calendar events.

This class uses the events relateds cache in order to get the related data for exporting an event without having to naively hit the database for each event.

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

Constructor & Destructor Documentation

◆ __construct()

core_calendar\external\events_exporter::__construct ( array $events,
$related = [] )

Constructor.

Parameters
array$eventsAn array of event_interface objects
array$relatedAn array of related objects

Member Function Documentation

◆ define_other_properties()

static core_calendar\external\events_exporter::define_other_properties ( )
staticprotected

Return the list of additional properties.

Return values
array

Reimplemented in core_calendar\external\events_same_course_exporter.

◆ define_related()

static core_calendar\external\events_exporter::define_related ( )
staticprotected

Returns a list of objects that are related.

Return values
array

◆ get_other_values()

core_calendar\external\events_exporter::get_other_values ( renderer_base $output)
protected

Get the additional values to inject while exporting.

Parameters
renderer_base$outputThe renderer.
Return values
arrayKeys are the property names, values are their values.

Reimplemented in core_calendar\external\events_same_course_exporter.


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