Moodle PHP Documentation 5.1
Moodle 5.1dev (Build: 20250530) (c39b7370636)
MoodleQuickForm_radio Class Reference

radio type form element More...

Inheritance diagram for MoodleQuickForm_radio:

Public Member Functions

 __construct ($elementName=null, $elementLabel=null, $text=null, $value=null, $attributes=null)
 constructor
 
 getElementTemplateType ()
 Slightly different container template when frozen.
 
 getFrozenHtml ()
 Returns the disabled field.
 
 getHelpButton ()
 get html for help button
 
 MoodleQuickForm_radio ($elementName=null, $elementLabel=null, $text=null, $value=null, $attributes=null)
 Old syntax of class constructor.
 
 setHiddenLabel ($hiddenLabel)
 Sets label to be hidden.
 
 toHtml ()
 Returns HTML for advchecbox form element.
 

Public Attributes

string $_helpbutton =''
 html for help button, if empty then no help
 

Protected Attributes

bool $_hiddenLabel = false
 if true label will be hidden.
 

Detailed Description

radio type form element

HTML class for a radio type element

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

Constructor & Destructor Documentation

◆ __construct()

MoodleQuickForm_radio::__construct ( $elementName = null,
$elementLabel = null,
$text = null,
$value = null,
$attributes = null )

constructor

Parameters
string$elementName(optional) name of the radio element
string$elementLabel(optional) label for radio element
string$text(optional) Text to put after the radio element
string$value(optional) default value
mixed$attributes(optional) Either a typical HTML attribute string or an associative array

Member Function Documentation

◆ getElementTemplateType()

MoodleQuickForm_radio::getElementTemplateType ( )

Slightly different container template when frozen.

Return values
string

◆ getFrozenHtml()

MoodleQuickForm_radio::getFrozenHtml ( )

Returns the disabled field.

Accessibility: the return "( )" from parent class is not acceptable for screenreader users, and we DO want a label.

Return values
string

◆ getHelpButton()

MoodleQuickForm_radio::getHelpButton ( )

get html for help button

Return values
stringhtml for help button

◆ MoodleQuickForm_radio()

MoodleQuickForm_radio::MoodleQuickForm_radio ( $elementName = null,
$elementLabel = null,
$text = null,
$value = null,
$attributes = null )

Old syntax of class constructor.

Deprecated in PHP7.

Deprecated
since Moodle 3.1

◆ setHiddenLabel()

MoodleQuickForm_radio::setHiddenLabel ( $hiddenLabel)

Sets label to be hidden.

Parameters
bool$hiddenLabelsets if label should be hidden

◆ toHtml()

MoodleQuickForm_radio::toHtml ( )

Returns HTML for advchecbox form element.

Return values
string

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