Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
core_grades\output\gradebook_dropdown Class Reference
Inheritance diagram for core_grades\output\gradebook_dropdown:
renderable templatable

Public Member Functions

 __construct (bool $renderlater, string $buttoncontent, ?string $dropdowncontent=null, ?string $parentclasses=null, ?string $buttonclasses=null, ?string $dropdownclasses=null, ?string $buttonheader=null, ?bool $usebutton=true)
 The class constructor.
 
 export_for_template (renderer_base $output)
 Export the data for the mustache template.
 
 get_template ()
 Returns the standard template for the dropdown.
 

Protected Attributes

null string $buttonclasses
 $buttonclasses Any special classes to put on the HTMLElement that triggers the dropdown.
 
string $buttoncontent
 $buttoncontent What is the content of the "Button" that users will always see.
 
null string $buttonheader
 $buttonheader If the button item in the tertiary nav needs an extra top header for context.
 
null string $dropdownclasses
 $dropdownclasses Any special classes to put on the HTMLElement that contains the actual dropdown.
 
null string $dropdowncontent
 $dropdowncontent The content that can be passed in to render immediately.
 
null string $parentclasses
 $parentclasses Any special classes to put on the HTMLElement that contains the BS events.
 
bool $renderlater
 $renderlater Should the dropdown render straightaway?
 
boolean $usesbutton
 $usesbutton Whether to provide a A11y button.
 

Constructor & Destructor Documentation

◆ __construct()

core_grades\output\gradebook_dropdown::__construct ( bool $renderlater,
string $buttoncontent,
?string $dropdowncontent = null,
?string $parentclasses = null,
?string $buttonclasses = null,
?string $dropdownclasses = null,
?string $buttonheader = null,
?bool $usebutton = true )

The class constructor.

Parameters
bool$renderlaterHow we figure out if we should render the template instantly.
string$buttoncontentWhat gets placed in the button.
?string$dropdowncontentWhat can be placed in the dropdown if we are rendering now.
?string$parentclassesThe classes that can be added that the bootstrap events are attached to.
?string$buttonclassesAny special classes that may be needed.
?string$dropdownclassesAny special classes that may be needed.
?string$buttonheaderIf the button item in the tertiary nav needs an extra top header for context.
bool$usebuttonIf we want the mustache to add the button roles for us or do we have another aria role node?
Exceptions
moodle_exceptionIf the implementor incorrectly call this module.

Member Function Documentation

◆ export_for_template()

core_grades\output\gradebook_dropdown::export_for_template ( renderer_base $output)

Export the data for the mustache template.

Parameters
renderer_base$outputrenderer to be used to render the action bar elements.
Return values
array

Implements templatable.

◆ get_template()

core_grades\output\gradebook_dropdown::get_template ( )

Returns the standard template for the dropdown.

Return values
string

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