Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250711) (9addea9f0ac)
core_course\output\actionbar\group_selector_button Class Reference
Inheritance diagram for core_course\output\actionbar\group_selector_button:
core\output\renderable core\output\named_templatable core\output\templatable

Public Member Functions

 __construct (protected context $context, protected int|bool $activegroup, protected string $label)
 The class constructor.
 
 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.
 

Constructor & Destructor Documentation

◆ __construct()

core_course\output\actionbar\group_selector_button::__construct ( protected context $context,
protected int|bool $activegroup,
protected string $label )

The class constructor.

Parameters
context$contextThe context instance.
int | bool$activegroupThe active group, or false if groups not used.
string$labelthe label string.

Member Function Documentation

◆ export_for_template()

core_course\output\actionbar\group_selector_button::export_for_template ( renderer_base $output)

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

Implements core\output\templatable.

◆ get_template_name()

core_course\output\actionbar\group_selector_button::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

Implements core\output\named_templatable.


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