Button form element.
More...
|
string | $_helpbutton ='' |
| html for help button, if empty then no help
|
|
|
bool | $_hiddenLabel = false |
| if true label will be hidden.
|
|
null string | $customclassoverride |
| Any class apart from 'btn' would be overridden with this content.
|
|
Button form element.
Contains HTML class for a button type element
- Copyright
- 2007 Jamie Pratt me@ja.nosp@m.miep.nosp@m..org
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later HTML class for a button type element
Overloaded HTML_QuickForm_button to add help button
- Copyright
- 2007 Jamie Pratt me@ja.nosp@m.miep.nosp@m..org
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
MoodleQuickForm_button::__construct |
( |
| $elementName = null, |
|
|
| $value = null, |
|
|
| $attributes = null, |
|
|
| $options = [] ) |
constructor
- Parameters
-
string | $elementName | (optional) name for the button |
string | $value | (optional) value for the button |
mixed | $attributes | (optional) Either a typical HTML attribute string or an associative array |
array | $options | Options to further customise the button. Currently accepted options are: customclassoverride String The CSS class to use for the button instead of the standard btn-primary and btn-secondary classes. |
◆ export_for_template()
MoodleQuickForm_button::export_for_template |
( |
renderer_base | $output | ) |
|
Function to export the renderer data in a format that is suitable for a mustache template.
This means:
- No complex types - only stdClass, array, int, string, float, bool
- Any additional info that is required for the template is pre-calculated (e.g. capability checks).
- Parameters
-
renderer_base | $output | Used to do a final render of any components that need to be rendered for export. |
- Return values
-
Implements templatable.
◆ getElementTemplateType()
MoodleQuickForm_button::getElementTemplateType |
( |
| ) |
|
Slightly different container template when frozen.
- Return values
-
◆ getHelpButton()
MoodleQuickForm_button::getHelpButton |
( |
| ) |
|
get html for help button
- Return values
-
string | html for help button |
◆ MoodleQuickForm_button()
MoodleQuickForm_button::MoodleQuickForm_button |
( |
| $elementName = null, |
|
|
| $value = null, |
|
|
| $attributes = null ) |
Old syntax of class constructor.
Deprecated in PHP7.
- Deprecated
- since Moodle 3.1
◆ setHiddenLabel()
MoodleQuickForm_button::setHiddenLabel |
( |
| $hiddenLabel | ) |
|
Sets label to be hidden.
- Parameters
-
bool | $hiddenLabel | sets if label should be hidden |
◆ $customclassoverride
null string MoodleQuickForm_button::$customclassoverride |
|
protected |
Any class apart from 'btn' would be overridden with this content.
By default, buttons will utilize the btn-secondary class. However, there are cases where we require a button with different stylings (e.g. btn-primary). In these cases, $customclassoverride will override the defaults mentioned previously and utilize the provided class(es).
$customclassoverride Custom class override for the input element
The documentation for this class was generated from the following file: