Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Glossary linking filter class. More...
Public Member Functions | |
filter ($text, array $options=array()) | |
Override this function to actually implement the filtering. More... | |
filterobject_prepare_replacement_callback ($concept, $glossaries) | |
Callback used by filterobject / filter_phrases. More... | |
hash () | |
setup ($page, $context) | |
Setup page with filter requirements and other prepare stuff. More... | |
Protected Member Functions | |
get_all_concepts () | |
Get all the concepts for this context. More... | |
Protected Attributes | |
null cache_store | $cache = null |
cache used to store the terms for this course. | |
context | $context |
The context we are in. | |
array | $localconfig |
Any local configuration for this filter in this context. | |
Glossary linking filter class.
NOTE: multilang glossary entries are not compatible with this filter.
filter_glossary::filter | ( | $text, | |
array | $options = array() |
||
) |
Override this function to actually implement the filtering.
string | $text | some HTML content to process. |
array | $options | options passed to the filters |
string | the HTML content after the filtering has been applied. |
Reimplemented from moodle_text_filter.
filter_glossary::filterobject_prepare_replacement_callback | ( | $concept, | |
$glossaries | |||
) |
Callback used by filterobject / filter_phrases.
object | $concept | the concept that is being replaced (from get_all_concepts). |
array | $glossaries | the list of glossary titles (from get_all_concepts). |
array | [$hreftagbegin, $hreftagend, $replacementphrase] for filterobject. |
|
protected |
Get all the concepts for this context.
filterobject[] | the concepts, and filterobjects. |
filter_glossary::setup | ( | $page, | |
$context | |||
) |
Setup page with filter requirements and other prepare stuff.
Override this method if the filter needs to setup page requirements or needs other stuff to be executed.
Note this method is invoked from {
moodle_page | $page | the page we are going to add requirements to. |
context | $context | the context which contents are going to be filtered. |
Reimplemented from moodle_text_filter.