Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
core\output\chooser Class Reference

The chooser renderable class. More...

Inheritance diagram for core\output\chooser:
renderable templatable core_course\output\modchooser core_question\output\qbank_chooser mod_quiz\output\question_chooser

Public Member Functions

 __construct (moodle_url $actionurl, lang_string $title, array $sections, $paramname)
 Constructor. More...
 
 add_param ($name, $value, $id=null)
 Add a parameter to submit with the form. More...
 
 export_for_template (renderer_base $output)
 Export for template. More...
 
 set_instructions (lang_string $value)
 Set the chooser instructions. More...
 
 set_method ($value)
 Set the form method. More...
 

Public Attributes

moodle_url $actionurl
 The form action URL.
 
lang_string $instructions
 The instructions to display.
 
string $method = 'post'
 The form method.
 
string $paramname
 The name of the parameter for the items value.
 
array $params = []
 The list of hidden parameters. More...
 
chooser_section[] $sections
 The sections.
 
lang_string $title
 The chooser title.
 

Detailed Description

The chooser renderable class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core\output\chooser::__construct ( moodle_url  $actionurl,
lang_string  $title,
array  $sections,
  $paramname 
)

Constructor.

Parameters
moodle_url$actionurlThe form action URL.
lang_string$titleThe title of the chooser.
chooser_section[]$sectionsThe sections.
string$paramnameThe name of the parameter for the items value.

Member Function Documentation

◆ add_param()

core\output\chooser::add_param (   $name,
  $value,
  $id = null 
)

Add a parameter to submit with the form.

Parameters
string$nameThe parameter name.
string$valueThe parameter value.
string$idThe parameter ID.

◆ export_for_template()

core\output\chooser::export_for_template ( renderer_base  $output)

Export for template.

Parameters
renderer_baseThe renderer.
Return values
stdClass

Implements templatable.

Reimplemented in core_course\output\modchooser.

◆ set_instructions()

core\output\chooser::set_instructions ( lang_string  $value)

Set the chooser instructions.

Parameters
lang_string$valueThe instructions.

◆ set_method()

core\output\chooser::set_method (   $value)

Set the form method.

Parameters
string$valueThe method.

Member Data Documentation

◆ $params

array core\output\chooser::$params = []

The list of hidden parameters.

See self::add_param.


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