Class for displaying the month view.
More...
|
calendar_information | $calendar |
| $calendar The calendar to be rendered.
|
|
stdClass array | $data = null |
| The data of this exporter.
|
|
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.
|
|
array | $related = array() |
| $related List of related objects used to avoid DB queries.
|
|
bool | $showcoursefilter = false |
| $showcoursefilter Whether to render the course filter selector as well.
|
|
moodle_url | $url |
| $url The URL for the events page.
|
|
Class for displaying the month view.
- Copyright
- 2017 Andrew Nicols andre.nosp@m.w@ni.nosp@m.cols..nosp@m.co.u.nosp@m.k
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
◆ define_other_properties()
static core_calendar\external\month_exporter::define_other_properties |
( |
| ) |
|
|
staticprotected |
◆ define_properties()
static core_calendar\external\month_exporter::define_properties |
( |
| ) |
|
|
staticprotected |
Return the list of properties.
The format of the array returned by this method has to match the structure defined in core::persistent::define_properties(). Howewer you can add a new attribute "description" to describe the parameter for documenting the API.
Note that the type PARAM_TEXT should ONLY be used for strings which need to go through filters (multilang, etc...) and do not have a FORMAT_* associated to them. Typically strings passed through to format_string().
Other filtered strings which use a FORMAT_* constant (hear used with format_text) must be defined as PARAM_RAW.
- Return values
-
Reimplemented from core\external\exporter.
◆ define_related()
static core_calendar\external\month_exporter::define_related |
( |
| ) |
|
|
staticprotected |
◆ export()
Function to export the renderer data in a format that is suitable for a mustache template.
This means raw records are generated as in to_record, but all strings are correctly passed through external_format_text (or external_format_string).
- Parameters
-
renderer_base | $output | Used to do a final render of any components that need to be rendered for export. |
- Return values
-
◆ format_properties()
static core\external\exporter::format_properties |
( |
|
$properties | ) |
|
|
staticfinalinherited |
Recursively formats a given property definition with the default fields required.
- Parameters
-
array | $properties | List of properties to format |
- Return values
-
◆ get_context_structure()
static core\external\exporter::get_context_structure |
( |
| ) |
|
|
staticfinalprotectedinherited |
Get the context structure.
- Return values
-
◆ get_course_filter_selector()
core_calendar\external\month_exporter::get_course_filter_selector |
( |
renderer_base |
$output | ) |
|
|
protected |
Get the course filter selector.
- Parameters
-
- Return values
-
string | The html code for the course filter selector. |
◆ get_create_structure()
static core\external\exporter::get_create_structure |
( |
| ) |
|
|
staticfinalinherited |
Returns the create structure.
- Return values
-
◆ 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
-
- Return values
-
◆ get_days()
core_calendar\external\month_exporter::get_days |
( |
| ) |
|
|
protected |
Get the list of days with the matching date array.
- Return values
-
◆ 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
-
◆ get_format_field()
static core\external\exporter::get_format_field |
( |
|
$definitions, |
|
|
|
$property |
|
) |
| |
|
staticfinalprotectedinherited |
Get the format field name.
- Parameters
-
array | $definitions | List of properties definitions. |
string | $property | The name of the property that may have a format field. |
- Return values
-
bool|string | False, or the name of the format property. |
◆ get_format_parameters()
core\external\exporter::get_format_parameters |
( |
|
$property | ) |
|
|
finalprotectedinherited |
Get the format parameters.
This method returns the parameters to use with the functions external_format_text(), and external_format_string(). To override the default parameters, you can define a protected method called 'get_format_parameters_for_<propertyName>'. For example, 'get_format_parameters_for_description', if your property is 'description'.
Your method must return an array containing any of the following keys:
- Parameters
-
string | $property | The property to get the parameters for. |
- Return values
-
◆ get_format_structure()
static core\external\exporter::get_format_structure |
( |
|
$property, |
|
|
|
$definition, |
|
|
|
$required = VALUE_REQUIRED |
|
) |
| |
|
staticfinalprotectedinherited |
Get the format structure.
- Parameters
-
string | $property | The name of the property on which the format applies. |
array | $definition | The definition of the format property. |
int | $required | Constant VALUE_*. |
- Return values
-
◆ get_month_data()
core_calendar\external\month_exporter::get_month_data |
( |
| ) |
|
|
protected |
Get the current month timestamp.
- Return values
-
◆ get_next_month_data()
core_calendar\external\month_exporter::get_next_month_data |
( |
| ) |
|
|
protected |
Get the next month timestamp.
- Return values
-
int | The 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
-
- Return values
-
array | Keys are the property names, values are their values. |
Reimplemented from core\external\exporter.
◆ get_previous_month_data()
core_calendar\external\month_exporter::get_previous_month_data |
( |
| ) |
|
|
protected |
Get the previous month timestamp.
- Return values
-
int | The previous month timestamp. |
◆ get_read_structure()
static core\external\exporter::get_read_structure |
( |
| ) |
|
|
staticfinalinherited |
Returns the read structure.
- Return values
-
◆ get_read_structure_from_properties()
static core\external\exporter::get_read_structure_from_properties |
( |
|
$properties, |
|
|
|
$required = VALUE_REQUIRED , |
|
|
|
$default = null |
|
) |
| |
|
staticfinalprotectedinherited |
Returns the read structure from a set of properties (recursive).
- Parameters
-
array | $properties | The properties. |
int | $required | Whether is required. |
mixed | $default | The default value. |
- Return values
-
◆ get_update_structure()
static core\external\exporter::get_update_structure |
( |
| ) |
|
|
staticfinalinherited |
Returns the update structure.
This structure can never be included at the top level for an external function signature because it contains optional parameters.
- Return values
-
◆ 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
-
- Return values
-
◆ properties_definition()
static core\external\exporter::properties_definition |
( |
| ) |
|
|
staticfinalinherited |
Get the properties definition of this exporter used for create, and update structures.
The read structures are returned by: self::read_properties_definition().
- Return values
-
array | Keys are the property names, and value their definition. |
◆ read_properties_definition()
static core\external\exporter::read_properties_definition |
( |
| ) |
|
|
staticfinalinherited |
Get the read properties definition of this exporter.
Read properties combines the default properties from the model (persistent or stdClass) with the properties defined by self::define_other_properties().
- Return values
-
array | Keys are the property names, and value their definition. |
◆ set_includenavigation()
core_calendar\external\month_exporter::set_includenavigation |
( |
|
$include | ) |
|
Set whether the navigation should be shown.
- Parameters
-
- Return values
-
◆ 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
-
- Return values
-
◆ set_showcoursefilter()
core_calendar\external\month_exporter::set_showcoursefilter |
( |
bool |
$show | ) |
|
Set whether the course filter selector should be shown.
- Parameters
-
- Return values
-
The documentation for this class was generated from the following file: