Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

The chooser renderable.

Copyright: 2016 Frédéric Massart - FMCorz.net
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 134 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

chooser:: (5 methods):
  __construct()
  add_param()
  set_instructions()
  set_method()
  export_for_template()


Class: chooser  - X-Ref

The chooser renderable class.

__construct(moodle_url $actionurl, lang_string $title, array $sections, $paramname)   X-Ref
Constructor.

param: moodle_url $actionurl The form action URL.
param: lang_string $title The title of the chooser.
param: chooser_section[] $sections The sections.
param: string $paramname The name of the parameter for the items value.

add_param($name, $value, $id = null)   X-Ref
Add a parameter to submit with the form.

param: string $name The parameter name.
param: string $value The parameter value.
param: string $id The parameter ID.

set_instructions(lang_string $value)   X-Ref
Set the chooser instructions.

param: lang_string $value The instructions.

set_method($value)   X-Ref
Set the form method.

param: string $value The method.

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

param: renderer_base The renderer.
return: stdClass