Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
|
Glossary linking filter class. More...
Public Member Functions | |
filter ($text, array $options=array()) | |
Override this function to actually implement the filtering. | |
filter_stage_post_clean (string $text, array $options) | |
Filter HTML text at the very end after text is sanitised. | |
filter_stage_pre_clean (string $text, array $options) | |
Filter HTML text before sanitising text. | |
filter_stage_pre_format (string $text, array $options) | |
Filter text before changing format to HTML. | |
filter_stage_string (string $text, array $options) | |
Filter simple text coming from format_string(). | |
filterobject_prepare_replacement_callback ($concept, $glossaries) | |
Callback used by filterobject / filter_phrases. | |
hash () | |
setup ($page, $context) | |
Setup page with filter requirements and other prepare stuff. | |
Protected Member Functions | |
get_all_concepts () | |
Get all the concepts for this context. | |
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.
Filter developers must make sure that filtering done after text cleaning does not introduce security vulnerabilities.
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.