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

Class for displaying the month view. More...

Inheritance diagram for core_calendar\external\month_exporter:

Public Member Functions

 __construct (\calendar_information $calendar, core_calendar\type_base $type, $related)
 Constructor for month_exporter.
 
 set_includenavigation ($include)
 Set whether the navigation should be shown.
 
 set_initialeventsloaded (bool $loaded)
 Set whether the initial events have already been loaded and provided to the exporter.
 
 set_showcoursefilter (bool $show)
 Set whether the course filter selector should be shown.
 

Protected Member Functions

 get_course_filter_selector (renderer_base $output)
 Get the course filter selector.
 
 get_day_names (renderer_base $output)
 Get the list of day names for display, re-ordered from the first day of the week.
 
 get_days ()
 Get the list of days with the matching date array.
 
 get_default_add_context ()
 Get the default context for use when adding a new event.
 
 get_month_data ()
 Get the current month timestamp.
 
 get_next_month_data ()
 Get the next month timestamp.
 
 get_other_values (renderer_base $output)
 Get the additional values to inject while exporting.
 
 get_previous_month_data ()
 Get the previous month timestamp.
 
 get_weeks (renderer_base $output)
 Get the list of week days, ordered into weeks and padded according to the value of the first day of the week.
 

Static Protected Member Functions

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

Protected Attributes

calendar_information $calendar
 $calendar The calendar to be rendered.
 
int $calendarinstanceid = 0
 This calendar instance's ID.
 
int $firstdayofweek
 $firstdayofweek The first day of the week.
 
bool $includenavigation = true
 $includenavigation Whether navigation should be included on the output.
 
bool $initialeventsloaded = true
 $initialeventsloaded Whether the events have been loaded for this month.
 
bool $showcoursefilter = false
 $showcoursefilter Whether to render the course filter selector as well.
 
moodle_url $url
 $url The URL for the events page.
 

Static Protected Attributes

static int $calendarinstances = 0
 Number of calendar instances displayed.
 

Detailed Description

Class for displaying the month view.

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

Constructor & Destructor Documentation

◆ __construct()

core_calendar\external\month_exporter::__construct ( \calendar_information $calendar,
core_calendar\type_base $type,
$related )

Constructor for month_exporter.

Parameters
calendar_information$calendarThe calendar being represented
core_calendar\type_base$typeThe calendar type (e.g. Gregorian)
array$relatedThe related information

Member Function Documentation

◆ define_other_properties()

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

Return the list of additional properties.

Return values
array

◆ define_related()

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

Returns a list of objects that are related.

Return values
array

◆ get_course_filter_selector()

core_calendar\external\month_exporter::get_course_filter_selector ( renderer_base $output)
protected

Get the course filter selector.

Parameters
renderer_base$output
Return values
stringThe html code for the course filter selector.

◆ get_day_names()

core_calendar\external\month_exporter::get_day_names ( renderer_base $output)
protected

Get the list of day names for display, re-ordered from the first day of the week.

Parameters
renderer_base$output
Return values
day_name_exporter[]

◆ get_days()

core_calendar\external\month_exporter::get_days ( )
protected

Get the list of days with the matching date array.

Return values
array

◆ get_default_add_context()

core_calendar\external\month_exporter::get_default_add_context ( )
protected

Get the default context for use when adding a new event.

Return values
null|context

◆ get_month_data()

core_calendar\external\month_exporter::get_month_data ( )
protected

Get the current month timestamp.

Return values
intThe month timestamp.

◆ get_next_month_data()

core_calendar\external\month_exporter::get_next_month_data ( )
protected

Get the next month timestamp.

Return values
intThe next month timestamp.

◆ get_other_values()

core_calendar\external\month_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.

◆ get_previous_month_data()

core_calendar\external\month_exporter::get_previous_month_data ( )
protected

Get the previous month timestamp.

Return values
intThe previous month timestamp.

◆ get_weeks()

core_calendar\external\month_exporter::get_weeks ( renderer_base $output)
protected

Get the list of week days, ordered into weeks and padded according to the value of the first day of the week.

Parameters
renderer_base$output
Return values
arrayThe list of weeks.

◆ set_includenavigation()

core_calendar\external\month_exporter::set_includenavigation ( $include)

Set whether the navigation should be shown.

Parameters
bool$include
Return values
$this

◆ set_initialeventsloaded()

core_calendar\external\month_exporter::set_initialeventsloaded ( bool $loaded)

Set whether the initial events have already been loaded and provided to the exporter.

Parameters
bool$loaded
Return values
$this

◆ set_showcoursefilter()

core_calendar\external\month_exporter::set_showcoursefilter ( bool $show)

Set whether the course filter selector should be shown.

Parameters
bool$show
Return values
$this

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