Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
pix_emoticon Class Reference

Data structure representing an emoticon image. More...

Inheritance diagram for pix_emoticon:
pix_icon renderable renderable templatable

Public Member Functions

 __construct ($pix, $alt, $component='moodle', array $attributes=array())
 Constructor.
 
 export_for_pix ()
 Much simpler version of export that will produce the data required to render this pix with the pix helper in a mustache tag.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 

Public Attributes

array $attributes = array()
 An array of attributes to use on the icon.
 
string $component
 The component the icon belongs to.
 
string $pix
 The icon name.
 

Detailed Description

Data structure representing an emoticon image.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Since
Moodle 2.0

Constructor & Destructor Documentation

◆ __construct()

pix_emoticon::__construct ( $pix,
$alt,
$component = 'moodle',
array $attributes = array() )

Constructor.

Parameters
string$pixshort icon name
string$altalternative text
string$componentemoticon image provider
array$attributesexplicit HTML attributes

Reimplemented from pix_icon.

Member Function Documentation

◆ export_for_pix()

pix_icon::export_for_pix ( )
inherited

Much simpler version of export that will produce the data required to render this pix with the pix helper in a mustache tag.

Return values
array

◆ export_for_template()

pix_icon::export_for_template ( renderer_base $output)
inherited

Export this data so it can be used as the context for a mustache template.

Parameters
renderer_base$outputUsed to do a final render of any components that need to be rendered for export.
Return values
array

Implements templatable.


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