|
action_menu | $actionmenu = null |
| The action menu this link has been added to.
|
|
array | $actions |
| List of actions attached to link.
|
|
array | $attributes |
| HTML attributes.
|
|
pix_icon | $icon |
| Optional pix icon to render with the link.
|
|
bool | $primary = true |
| True if this is a primary action.
|
|
string | $text |
| Link text HTML fragment.
|
|
moodle_url | $url |
| Href url.
|
|
|
static int | $instance = 1 |
| The number of instances of this action menu link (and its subclasses).
|
|
- Copyright
- 2013 Sam Hemelryk
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core\output\action_menu\link::__construct |
( |
moodle_url | $url, |
|
|
?pix_icon | $icon, |
|
|
| $text, |
|
|
| $primary = true, |
|
|
array | $attributes = [] ) |
Constructs the object.
- Parameters
-
moodle_url | $url | The URL for the action. |
pix_icon | null | $icon | The icon to represent the action. |
string | $text | The text to represent the action. |
bool | $primary | Whether this is a primary action or not. |
array | $attributes | Any attribtues associated with the action. |
◆ add_action()
Add action to the link.
- Parameters
-
◆ add_class()
core\output\action_link::add_class |
( |
| $class | ) |
|
|
inherited |
Adds a CSS class to this action link object.
- Parameters
-
◆ export_for_template()
core\output\action_menu\link::export_for_template |
( |
renderer_base | $output | ) |
|
Export for template.
- Parameters
-
renderer_base | $output | The renderer. |
- Return values
-
Reimplemented from core\output\action_link.
◆ get_icon_html()
core\output\action_link::get_icon_html |
( |
| ) |
|
|
inherited |
Return the rendered HTML for the icon.
Useful for rendering action links in a template.
- Return values
-
◆ has_class()
core\output\action_link::has_class |
( |
| $class | ) |
|
|
inherited |
Returns true if the specified class has been added to this link.
- Parameters
-
- Return values
-
◆ $instance
int core\output\action_menu\link::$instance = 1 |
|
staticprotected |
The number of instances of this action menu link (and its subclasses).
- Deprecated
- since Moodle 4.4.
◆ $primary
bool core\output\action_menu\link::$primary = true |
True if this is a primary action.
False if not.
The documentation for this class was generated from the following file:
- lib/classes/output/action_menu/link.php