This filter provides automatic linking to glossary entries, aliases and categories when found inside every Moodle text.
Copyright: | 2004 onwards Eloy Lafuente (stronk7) {@link http://stronk7.com} |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 196 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 1 time |
Includes or requires: | 0 files |
filter_glossary:: (5 methods):
setup()
get_all_concepts()
filterobject_prepare_replacement_callback()
filter()
sort_entries_by_length()
Class: filter_glossary - X-Ref
Glossary linking filter class.setup($page, $context) X-Ref |
No description |
get_all_concepts() X-Ref |
Get all the concepts for this context. return: filterobject[] the concepts, and filterobjects. |
filterobject_prepare_replacement_callback($concept, $glossaries) X-Ref |
Callback used by filterobject / filter_phrases. param: object $concept the concept that is being replaced (from get_all_concepts). param: array $glossaries the list of glossary titles (from get_all_concepts). return: array [$hreftagbegin, $hreftagend, $replacementphrase] for filterobject. |
filter($text, array $options = array() X-Ref |
No description |
sort_entries_by_length($filterobject0, $filterobject1) X-Ref |
usort helper used in get_all_concepts above. param: filterobject $filterobject0 first item to compare. param: filterobject $filterobject1 second item to compare. return: int -1, 0 or 1. |