Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
core\hook\output\before_html_attributes Class Reference

Public Member Functions

 __construct (public renderer_base readonly renderer_base $renderer, private array array $attributes=[],)
 Constructor for the before_html_attributes hook.
 
 add_attribute (string $name, string $value)
 Add an HTML attribute to the list.
 
 get_attributes ()
 Get the list of attributes.
 
 process_legacy_callbacks ()
 Process legacy callbacks.
 
 remove_attribute (string $name)
 Remove an HTML attribute from the list.
 

Constructor & Destructor Documentation

◆ __construct()

core\hook\output\before_html_attributes::__construct ( public renderer_base readonly renderer_base $renderer,
private array array $attributes = [] )

Constructor for the before_html_attributes hook.

Parameters
renderer_base$rendererThe page renderer object
array$attributesThe list of HTML attributes initially on the tag
Parameters
$rendererThe page renderer
$attributesThe list of HTML attributes initially on the tag

Member Function Documentation

◆ add_attribute()

core\hook\output\before_html_attributes::add_attribute ( string $name,
string $value )

Add an HTML attribute to the list.

Parameters
string$name
string$value

◆ get_attributes()

core\hook\output\before_html_attributes::get_attributes ( )

Get the list of attributes.

Return values
array

◆ remove_attribute()

core\hook\output\before_html_attributes::remove_attribute ( string $name)

Remove an HTML attribute from the list.

Parameters
string$name

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