Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

(no description)

File Size: 133 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

gradebook_dropdown:: (3 methods):
  __construct()
  export_for_template()
  get_template()


Class: gradebook_dropdown  - X-Ref

Renderable class for the dropdown in the gradebook pages.

We have opted to have this as a class as opposed to a renderable for prosperity
in the case that custom handling is required by the calling code.

This could become a abstract class if other components require similar functionality and wish to extend the base here.

__construct(bool $renderlater,string $buttoncontent,?string $dropdowncontent = null,?string $parentclasses = null,?string $buttonclasses = null,?string $dropdownclasses = null,?string $buttonheader = null,?bool $usebutton = true)   X-Ref
The class constructor.

param: bool $renderlater How we figure out if we should render the template instantly.
param: string $buttoncontent What gets placed in the button.
param: ?string $dropdowncontent What can be placed in the dropdown if we are rendering now.
param: ?string $parentclasses The classes that can be added that the bootstrap events are attached to.
param: ?string $buttonclasses Any special classes that may be needed.
param: ?string $dropdownclasses Any special classes that may be needed.
param: ?string $buttonheader If the button item in the tertiary nav needs an extra top header for context.
param: bool $usebutton If we want the mustache to add the button roles for us or do we have another aria role node?

export_for_template(renderer_base $output)   X-Ref
Export the data for the mustache template.

param: renderer_base $output renderer to be used to render the action bar elements.
return: array

get_template()   X-Ref
Returns the standard template for the dropdown.

return: string