Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Public Attributes | List of all members
gradereport_singleview\local\ui\text_attribute Class Reference

UI element for a text input field. More...

Inheritance diagram for gradereport_singleview\local\ui\text_attribute:
gradereport_singleview\local\ui\element

Public Member Functions

 __construct ($name, $value, $label, $isdisabled=false)
 Constructor. More...
 
 html ()
 Render the html for this field. More...
 
 is_checkbox ()
 Nasty function used for spreading checkbox logic all around. More...
 
 is_dropdown ()
 Nasty function used for spreading dropdown logic all around. More...
 
 is_textbox ()
 Nasty function allowing custom textbox behaviour outside the class. More...
 

Public Attributes

string $label
 $label The form label for this input.
 
string $name
 $name The first bit of the name for this input.
 
string $value
 $value The value for this input.
 

Detailed Description

UI element for a text input field.

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

Constructor & Destructor Documentation

◆ __construct()

gradereport_singleview\local\ui\text_attribute::__construct (   $name,
  $value,
  $label,
  $isdisabled = false 
)

Constructor.

Parameters
string$nameThe input name (the first bit)
string$valueThe input initial value.
string$labelThe label for this input field.
bool$isdisabledIs this input disabled.

Member Function Documentation

◆ html()

gradereport_singleview\local\ui\text_attribute::html ( )

Render the html for this field.

Return values
stringThe HTML.

Reimplemented from gradereport_singleview\local\ui\element.

◆ is_checkbox()

gradereport_singleview\local\ui\element::is_checkbox ( )
inherited

Nasty function used for spreading checkbox logic all around.

Return values
bool

Reimplemented in gradereport_singleview\local\ui\checkbox_attribute.

◆ is_dropdown()

gradereport_singleview\local\ui\element::is_dropdown ( )
inherited

Nasty function used for spreading dropdown logic all around.

Return values
bool

Reimplemented in gradereport_singleview\local\ui\dropdown_attribute.

◆ is_textbox()

gradereport_singleview\local\ui\text_attribute::is_textbox ( )

Nasty function allowing custom textbox behaviour outside the class.

Return values
boolIs this a textbox.

Reimplemented from gradereport_singleview\local\ui\element.


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