Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is 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