Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
core_tag\output\tagfeed Class Reference

Class to display feed of tagged items. More...

Inheritance diagram for core_tag\output\tagfeed:
templatable

Public Member Functions

 __construct ($items=array())
 Constructor.
 
 add ($img, $heading, $details='')
 Adds one item to the tagfeed.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 

Protected Attributes

array $items
 

Detailed Description

Class to display feed of tagged items.

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

Constructor & Destructor Documentation

◆ __construct()

core_tag\output\tagfeed::__construct ( $items = array())

Constructor.

Usually the most convenient way is to call constructor without arguments and add items later using add() method.

Parameters
array$items

Member Function Documentation

◆ add()

core_tag\output\tagfeed::add ( $img,
$heading,
$details = '' )

Adds one item to the tagfeed.

Parameters
string$imgHTML code representing image (or image wrapped in a link), note that core_tag/tagfeed template expects image to be 35x35 px
string$headingHTML for item heading
string$detailsHTML for item details (keep short)

◆ export_for_template()

core_tag\output\tagfeed::export_for_template ( renderer_base $output)

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

Parameters
renderer_base$output
Return values
stdClass

Implements templatable.


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