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

Class to display a tag cloud - set of tags where each has a weight. More...

Inheritance diagram for core_tag\output\tagcloud:
templatable

Public Member Functions

 __construct ($tagset, $totalcount=0, $fromctx=0, $ctx=0, $rec=1)
 Constructor.
 
 export_for_template (renderer_base $output)
 Export this data so it can be used as the context for a mustache template.
 
 get_count ()
 Returns number of tags in the cloud.
 

Protected Attributes

array $tagset
 
int $totalcount
 

Detailed Description

Class to display a tag cloud - set of tags where each has a weight.

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

Constructor & Destructor Documentation

◆ __construct()

core_tag\output\tagcloud::__construct ( $tagset,
$totalcount = 0,
$fromctx = 0,
$ctx = 0,
$rec = 1 )

Constructor.

Parameters
array$tagsetarray of core_tag or stdClass elements, each of them must have attributes: name, rawname, tagcollid preferrably also have attributes: isstandard, count, flag
int$totalcounttotal count of tags (for example to indicate that there are more tags than the count of tagset) leave 0 if count of tagset is the actual count of tags
int$fromctxcontext id where this tag cloud is displayed
int$ctxcontext id for tag view link
int$recrecursive argument for tag view link

Member Function Documentation

◆ export_for_template()

core_tag\output\tagcloud::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.

◆ get_count()

core_tag\output\tagcloud::get_count ( )

Returns number of tags in the cloud.

Return values
int

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