A button that is used to select users for a form.
More...
|
string | $actionid |
| Action id.
|
|
array | $actions = array() |
| List of attached actions.
|
|
string | $class = 'singlebutton' |
| Wrapping div class.
|
|
bool | $disabled = false |
| True if button disabled, false if normal.
|
|
string | $formid |
| Form id.
|
|
string | $label |
| Button label.
|
|
string | $method = 'post' |
| Form submit method post or get.
|
|
array | $params |
| $params URL Params
|
|
string | $tooltip = null |
| Button tooltip.
|
|
moodle_url | $url |
| Target url.
|
|
const | BUTTON_DANGER = 'danger' |
| Possible button types - Danger.
|
|
const | BUTTON_INFO = 'info' |
| Possible button types - Info.
|
|
const | BUTTON_PRIMARY = 'primary' |
| Possible button types - Primary.
|
|
const | BUTTON_SECONDARY = 'secondary' |
| Possible button types - Secondary.
|
|
const | BUTTON_SUCCESS = 'success' |
| Possible button types - Success.
|
|
const | BUTTON_TYPES |
| Possible button types.
|
|
const | BUTTON_WARNING = 'warning' |
| Possible button types - Warning.
|
|
|
array | $attributes = [] |
|
string | $type |
| Type of button (from defined types).
|
|
A button that is used to select users for a form.
- Since
- Moodle 2.8
- Copyright
- 2013 NetSpot Pty Ltd (https://www.netspot.com.au)
- Author
- Adam Olley adam..nosp@m.olle.nosp@m.y@net.nosp@m.spot.nosp@m..com..nosp@m.au
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
gradereport_history\output\user_button::__construct |
( |
\moodle_url | $url, |
|
|
| $label, |
|
|
| $method = 'post' ) |
Initialises the new select_user_button.
- Parameters
-
moodle_url | $url | |
string | $label | The text to display in the button |
string | $method | Either post or get |
◆ __get()
single_button::__get |
( |
| $name | ) |
|
|
inherited |
Magic method getter.
This method manages access to some properties and will display deprecation message when accessing 'primary' property.
- Parameters
-
- Return values
-
◆ __set()
single_button::__set |
( |
| $name, |
|
|
| $value ) |
|
inherited |
Magic setter method.
This method manages access to some properties and will display deprecation message when accessing 'primary' property.
- Parameters
-
◆ add_action()
Add action to the button.
- Parameters
-
◆ add_confirm_action()
single_button::add_confirm_action |
( |
| $confirmmessage | ) |
|
|
inherited |
Shortcut for adding a JS confirm dialog when the button is clicked.
The message must be a yes/no question.
- Parameters
-
string | $confirmmessage | The yes/no confirmation question. If "Yes" is clicked, the original action will occur. |
◆ export_for_template()
Export data.
- Parameters
-
- Return values
-
◆ set_attribute()
single_button::set_attribute |
( |
| $name, |
|
|
| $value ) |
|
inherited |
Sets an attribute for the HTML button tag.
- Parameters
-
string | $name | The attribute name |
mixed | $value | The value |
- Return values
-
◆ $type
string single_button::$type |
|
protectedinherited |
Type of button (from defined types).
Used for styling.
◆ BUTTON_TYPES
const single_button::BUTTON_TYPES |
|
inherited |
Initial value:= [
self::BUTTON_PRIMARY,
self::BUTTON_SECONDARY,
self::BUTTON_SUCCESS,
self::BUTTON_DANGER,
self::BUTTON_WARNING,
self::BUTTON_INFO
]
Possible button types.
From boostrap.
The documentation for this class was generated from the following file:
- grade/report/history/classes/output/user_button.php