Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core\output\local\action_menu\subpanel Class Reference
Inheritance diagram for core\output\local\action_menu\subpanel:
action_link renderable renderable

Public Member Functions

 __construct ( $text, renderable $subpanel, array $attributes=null, pix_icon $icon=null)
 Constructor.
 
 add_action (component_action $action)
 Add action to the link.
 
 add_class ($class)
 Adds a CSS class to this action link object.
 
 export_for_template (renderer_base $output)
 Export for template.
 
 export_for_template (\renderer_base $output)
 Export this object for template rendering.
 
 get_icon_html ()
 Return the rendered HTML for the icon.
 
 has_class ($class)
 Returns true if the specified class has been added to this link.
 

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.
 

Protected Attributes

renderable $subpanel
 The subpanel content.
 

Static Protected Attributes

static int $instance = 1
 The number of instances of this action menu link (and its subclasses).
 

Constructor & Destructor Documentation

◆ __construct()

core\output\local\action_menu\subpanel::__construct ( $text,
renderable $subpanel,
array $attributes = null,
pix_icon $icon = null )

Constructor.

Parameters
string$textthe text to display
renderable$subpanelthe subpanel content
array | null$attributesan optional array of attributes
pix_icon | null$iconan optional icon

Member Function Documentation

◆ add_action()

action_link::add_action ( component_action $action)
inherited

Add action to the link.

Parameters
component_action$action

◆ add_class()

action_link::add_class ( $class)
inherited

Adds a CSS class to this action link object.

Parameters
string$class

◆ export_for_template() [1/2]

action_link::export_for_template ( renderer_base $output)
inherited

Export for template.

Parameters
renderer_base$outputThe renderer.
Return values
stdClass

Reimplemented in action_menu_link.

◆ export_for_template() [2/2]

core\output\local\action_menu\subpanel::export_for_template ( \renderer_base $output)

Export this object for template rendering.

Parameters
renderer_base$outputthe output renderer
Return values
stdClass

◆ get_icon_html()

action_link::get_icon_html ( )
inherited

Return the rendered HTML for the icon.

Useful for rendering action links in a template.

Return values
string

◆ has_class()

action_link::has_class ( $class)
inherited

Returns true if the specified class has been added to this link.

Parameters
string$class
Return values
bool

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