Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Public Member Functions | |
__construct (moodle_url $url, $text, component_action $action=null, array $attributes=null, pix_icon $icon=null) | |
Constructor. More... | |
add_action (component_action $action) | |
Add action to the link. More... | |
add_class ($class) | |
Adds a CSS class to this action link object. More... | |
export_for_template (renderer_base $output) | |
Export for template. More... | |
get_icon_html () | |
Return the rendered HTML for the icon. More... | |
has_class ($class) | |
Returns true if the specified class has been added to this link. More... | |
Public Attributes | |
array | $actions |
List of actions attached to link. | |
array | $attributes |
HTML attributes. | |
pix_icon | $icon |
Optional pix icon to render with the link. | |
string | $text |
Link text HTML fragment. | |
moodle_url | $url |
Href url. | |
action_link::__construct | ( | moodle_url | $url, |
$text, | |||
component_action | $action = null , |
||
array | $attributes = null , |
||
pix_icon | $icon = null |
||
) |
Constructor.
moodle_url | $url | |
string | $text | HTML fragment |
component_action | $action | |
array | $attributes | associative array of html link attributes + disabled |
pix_icon | $icon | optional pix_icon to render with the link text |
action_link::add_action | ( | component_action | $action | ) |
Add action to the link.
component_action | $action |
action_link::add_class | ( | $class | ) |
Adds a CSS class to this action link object.
string | $class |
action_link::export_for_template | ( | renderer_base | $output | ) |
Export for template.
renderer_base | $output | The renderer. |
stdClass |
Reimplemented in action_menu_link.
action_link::get_icon_html | ( | ) |
Return the rendered HTML for the icon.
Useful for rendering action links in a template.
string |
action_link::has_class | ( | $class | ) |
Returns true if the specified class has been added to this link.
string | $class |
bool |