Moodle PHP Documentation 4.5
Moodle 4.5.5+ (Build: 20250711) (ce34e8ff087)
core\output\named_templatable Interface Reference
Inheritance diagram for core\output\named_templatable:
core\output\templatable core\output\choicelist core\output\comboboxsearch core\output\local\dropdown\dialog core\output\sticky_footer core_course\output\actionbar\group_selector_button core_course\output\actionbar\group_selector_dropdown_form core_course\output\actionbar\user_selector_button core_courseformat\output\activitybadge core_courseformat\output\local\content core_courseformat\output\local\content\addsection core_courseformat\output\local\content\basecontrolmenu core_courseformat\output\local\content\bulkedittoggler core_courseformat\output\local\content\bulkedittools core_courseformat\output\local\content\cm core_courseformat\output\local\content\cm\cmicon core_courseformat\output\local\content\cm\cmname core_courseformat\output\local\content\cm\completion core_courseformat\output\local\content\cm\groupmode core_courseformat\output\local\content\cm\title core_courseformat\output\local\content\cm\visibility core_courseformat\output\local\content\frontpagesection core_courseformat\output\local\content\section core_courseformat\output\local\content\section\availability core_courseformat\output\local\content\section\cmitem core_courseformat\output\local\content\section\cmlist core_courseformat\output\local\content\section\cmsummary core_courseformat\output\local\content\section\header core_courseformat\output\local\content\section\summary core_courseformat\output\local\content\section\visibility core_courseformat\output\local\content\sectionnavigation core_courseformat\output\local\content\sectionselector mod_quiz\output\attempt_summary_information mod_quiz\output\list_of_attempts qbank_viewquestionname\output\questionname

Public Member Functions

 export_for_template (renderer_base $output)
 Function to export the renderer data in a format that is suitable for a mustache template.
 
 get_template_name (renderer_base $renderer)
 Get the name of the template to use for this templatable.
 

Member Function Documentation

◆ export_for_template()

core\output\templatable::export_for_template ( renderer_base $output)
inherited

Function to export the renderer data in a format that is suitable for a mustache template.

This means:

  1. No complex types - only stdClass, array, int, string, float, bool
  2. Any additional info that is required for the template is pre-calculated (e.g. capability checks).
Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
stdClass|array

Implemented in core\output\action_menu, core\output\actions\component_action, core\output\activity_header, core\output\checkbox_toggleall, core\output\choicelist, core\output\chooser, core\output\chooser_item, core\output\chooser_section, core\output\comboboxsearch, core\output\context_header, core\output\custom_menu_item, core\output\dynamic_tabs, core\output\help_icon, core\output\initials_bar, core\output\paging_bar, core\output\pix_icon, core\output\pix_icon_font, core\output\progress_bar, core\output\select_menu, core\output\single_select, core\output\tabobject, core\output\tabtree, core\output\url_select, core_course\output\actionbar\group_selector_button, core_course\output\actionbar\group_selector_dropdown_form, and core_course\output\actionbar\user_selector_button.

◆ get_template_name()

core\output\named_templatable::get_template_name ( renderer_base $renderer)

Get the name of the template to use for this templatable.

Parameters
renderer_base$rendererThe renderer requesting the template name
Return values
string

Implemented in core\output\choicelist, core\output\comboboxsearch, core_course\output\actionbar\group_selector_button, core_course\output\actionbar\group_selector_dropdown_form, and core_course\output\actionbar\user_selector_button.


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