Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
core_calendar\external\week_day_exporter Class Reference

Class for displaying the day on month view. More...

Inheritance diagram for core_calendar\external\week_day_exporter:
core_calendar\external\day_exporter core\external\exporter

Public Member Functions

 __construct (\calendar_information $calendar, $data, $related)
 Constructor. More...
 
 export (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template. More...
 

Static Public Member Functions

static format_properties ($properties)
 Recursively formats a given property definition with the default fields required. More...
 
static get_create_structure ()
 Returns the create structure. More...
 
static get_read_structure ()
 Returns the read structure. More...
 
static get_update_structure ()
 Returns the update structure. More...
 
static properties_definition ()
 Get the properties definition of this exporter used for create, and update structures. More...
 
static read_properties_definition ()
 Get the read properties definition of this exporter. More...
 

Protected Member Functions

 get_day_title ()
 Get the title for this day. More...
 
 get_format_parameters ($property)
 Get the format parameters. More...
 
 get_navigation ()
 Get the calendar navigation controls. More...
 
 get_next_day_timestamp ($daytimestamp)
 Get the next day timestamp. More...
 
 get_other_values (renderer_base $output)
 Get the additional values to inject while exporting. More...
 
 get_popover_title ()
 Get the title for this popover. More...
 
 get_previous_day_timestamp ($daytimestamp)
 Get the previous day timestamp. More...
 
 get_view_link_title ()
 Get the title for view link. More...
 

Static Protected Member Functions

static define_other_properties ()
 Return the list of additional properties. More...
 
static define_properties ()
 Return the list of properties. More...
 
static define_related ()
 Returns a list of objects that are related. More...
 
static get_context_structure ()
 Get the context structure. More...
 
static get_format_field ($definitions, $property)
 Get the format field name. More...
 
static get_format_structure ($property, $definition, $required=VALUE_REQUIRED)
 Get the format structure. More...
 
static get_read_structure_from_properties ($properties, $required=VALUE_REQUIRED, $default=null)
 Returns the read structure from a set of properties (recursive). More...
 

Protected Attributes

calendar_information $calendar
 $calendar The calendar being displayed.
 
stdClass array $data = null
 The data of this exporter.
 
array $related = array()
 $related List of related objects used to avoid DB queries.
 
moodle_url $url
 

Detailed Description

Class for displaying the day on month view.

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

Constructor & Destructor Documentation

◆ __construct()

core_calendar\external\week_day_exporter::__construct ( \calendar_information  $calendar,
  $data,
  $related 
)

Constructor.

Parameters
calendar_information$calendarThe calendar information for the period being displayed
mixed$dataEither an stdClass or an array of values.
array$relatedRelated objects.

Reimplemented from core_calendar\external\day_exporter.

Member Function Documentation

◆ define_other_properties()

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

Return the list of additional properties.

Return values
array

Reimplemented from core_calendar\external\day_exporter.

◆ define_properties()

static core_calendar\external\week_day_exporter::define_properties ( )
staticprotected

Return the list of properties.

Return values
array

Reimplemented from core_calendar\external\day_exporter.

◆ define_related()

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

Returns a list of objects that are related.

Return values
array

Reimplemented from core_calendar\external\day_exporter.

◆ export()

core\external\exporter::export ( renderer_base  $output)
finalinherited

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$outputUsed to do a final render of any components that need to be rendered for export.
Return values
stdClass

◆ format_properties()

static core\external\exporter::format_properties (   $properties)
staticfinalinherited

Recursively formats a given property definition with the default fields required.

Parameters
array$propertiesList of properties to format
Return values
arrayFormatted array

◆ get_context_structure()

static core\external\exporter::get_context_structure ( )
staticfinalprotectedinherited

Get the context structure.

Return values
external_single_structure

◆ get_create_structure()

static core\external\exporter::get_create_structure ( )
staticfinalinherited

Returns the create structure.

Return values
external_single_structure

◆ get_day_title()

core_calendar\external\week_day_exporter::get_day_title ( )
protected

Get the title for this day.

Return values
string

◆ get_format_field()

static core\external\exporter::get_format_field (   $definitions,
  $property 
)
staticfinalprotectedinherited

Get the format field name.

Parameters
array$definitionsList of properties definitions.
string$propertyThe name of the property that may have a format field.
Return values
bool|stringFalse, 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$propertyThe property to get the parameters for.
Return values
array

◆ get_format_structure()

static core\external\exporter::get_format_structure (   $property,
  $definition,
  $required = VALUE_REQUIRED 
)
staticfinalprotectedinherited

Get the format structure.

Parameters
string$propertyThe name of the property on which the format applies.
array$definitionThe definition of the format property.
int$requiredConstant VALUE_*.
Return values
external_format_value

◆ get_navigation()

core_calendar\external\day_exporter::get_navigation ( )
protectedinherited

Get the calendar navigation controls.

Return values
stringThe html code to the calendar top navigation.

◆ get_next_day_timestamp()

core_calendar\external\day_exporter::get_next_day_timestamp (   $daytimestamp)
protectedinherited

Get the next day timestamp.

Parameters
int$daytimestampThe current day timestamp.
Return values
intThe next day timestamp.

◆ get_other_values()

core_calendar\external\week_day_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 from core_calendar\external\day_exporter.

◆ get_popover_title()

core_calendar\external\week_day_exporter::get_popover_title ( )
protected

Get the title for this popover.

Return values
string

◆ get_previous_day_timestamp()

core_calendar\external\day_exporter::get_previous_day_timestamp (   $daytimestamp)
protectedinherited

Get the previous day timestamp.

Parameters
int$daytimestampThe current day timestamp.
Return values
intThe previous day timestamp.

◆ get_read_structure()

static core\external\exporter::get_read_structure ( )
staticfinalinherited

Returns the read structure.

Return values
external_single_structure

◆ 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$propertiesThe properties.
int$requiredWhether is required.
mixed$defaultThe default value.
Return values
external_single_structure

◆ 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
external_single_structure

◆ get_view_link_title()

core_calendar\external\day_exporter::get_view_link_title ( )
protectedinherited

Get the title for view link.

Return values
string

◆ 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
arrayKeys 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
arrayKeys are the property names, and value their definition.

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