Class to preapare a list of tags for display, usually the list of tags some entry is tagged with.
More...
|
bool | $accesshidelabel |
| $accesshidelabel if true, the label should have class="accesshide" added.
|
|
string | $classes |
|
string | $label |
|
int | $limit |
|
array | $tags |
|
Class to preapare a list of tags for display, usually the list of tags some entry is tagged with.
- Copyright
- 2015 Marina Glancy
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
core_tag\output\taglist::__construct |
( |
|
$tags, |
|
|
|
$label = null , |
|
|
|
$classes = '' , |
|
|
|
$limit = 10 , |
|
|
|
$pagecontext = null , |
|
|
|
$accesshidelabel = false |
|
) |
| |
Constructor.
- Parameters
-
array | $tags | list of instances of core_tag_tag or stdClass |
string | $label | label to display in front, by default 'Tags' (get_string('tags')), set to null to use default, set to '' (empty string) to omit the label completely |
string | $classes | additional classes for the enclosing div element |
int | $limit | limit the number of tags to display, if size of $tags is more than this limit the "more" link will be appended to the end, JS will toggle the rest of the tags. 0 means no limit. |
context | $pagecontext | specify if needed to overwrite the current page context for the view tag link |
bool | $accesshidelabel | if true, the label should have class="accesshide" added. |
◆ export_for_template()
core_tag\output\taglist::export_for_template |
( |
renderer_base |
$output | ) |
|
Export this data so it can be used as the context for a mustache template.
- Parameters
-
- Return values
-
Implements templatable.
The documentation for this class was generated from the following file: