Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
|
Library functions for managing text filter plugins. More...
Classes | |
class | filter_manager |
Class to manage the filtering of strings. More... | |
class | filterobject |
This is just a little object to define a phrase and some instructions for how to process it. More... | |
class | moodle_text_filter |
Base class for text filters. More... | |
class | null_filter_manager |
Filter manager subclass that does nothing. More... | |
class | performance_measuring_filter_manager |
Filter manager subclass that tracks how much work it does. More... | |
Functions | |
filter_add_javascript ($text) | |
Add missing openpopup javascript to HTML files. More... | |
filter_context_may_have_filter_settings ($context) | |
Certain types of context (block and user) may not have local filter settings. More... | |
filter_delete_all_for_context ($contextid) | |
Delete all the data in the database relating to a context, used when contexts are deleted. More... | |
filter_delete_all_for_filter ($filter) | |
Delete all the data in the database relating to a filter, prior to deleting it. More... | |
filter_get_active_in_context ($context) | |
Get the list of active filters, in the order that they should be used for a particular context, along with any local configuration variables. More... | |
filter_get_active_state (string $filtername, $contextid=null) | |
Returns the active state for a filter in the given context. More... | |
filter_get_all_installed () | |
Get the names of all the filters installed in this Moodle. More... | |
filter_get_all_local_settings ($contextid) | |
This function is for use by backup. More... | |
filter_get_available_in_context ($context) | |
List all of the filters that are available in this context, and what the local and inherited states of that filter are. More... | |
filter_get_global_states () | |
This function is for use by the filter administration page. More... | |
filter_get_globally_enabled () | |
Return a list of all the filters that may be in use somewhere. More... | |
filter_get_globally_enabled_filters_with_config () | |
Get the globally enabled filters. More... | |
filter_get_local_config ($filter, $contextid) | |
Get local config variables for a filter in a context. More... | |
filter_get_name ($filter) | |
Look up the name of this filter. More... | |
filter_get_string_filters () | |
Return the names of the filters that should also be applied to strings (when they are enabled). More... | |
filter_has_global_settings ($filter) | |
Does this filter have a global settings page in the admin tree? (The settings page for a filter must be called, for example, filtersettingfiltertex.) More... | |
filter_has_local_settings ($filter) | |
Does this filter have local (per-context) settings? More... | |
filter_is_enabled ($filtername) | |
filter_phrases ($text, $linkarray, $ignoretagsopen=null, $ignoretagsclose=null, $overridedefaultignore=false, $linkarrayalreadyprepared=false) | |
Process phrases intelligently found within a HTML text (such as adding links). More... | |
filter_preload_activities (course_modinfo $modinfo) | |
Preloads the list of active filters for all activities (modules) on the course using two database queries. More... | |
filter_prepare_phrase_for_replacement (filterobject $linkobject) | |
Fill in the remaining ->work... fields, that would be needed to replace the phrase. More... | |
filter_prepare_phrases_for_filtering (array $linkarray) | |
Prepare a list of link for processing with filter_phrases(). More... | |
filter_remove_duplicates ($linkarray) | |
Remove duplicate from a list of filterobject. More... | |
filter_save_ignore_tags (&$text, $filterignoretagsopen, $filterignoretagsclose, &$ignoretags) | |
Extract open/lose tags and their contents to avoid being processed by filters. More... | |
filter_save_tags (&$text, &$tags) | |
Extract tags (any text enclosed by < and > to avoid being processed by filters. More... | |
filter_set_applies_to_strings ($filter, $applytostrings) | |
Sets whether a particular active filter should be applied to all strings by format_string, or just used by format_text. More... | |
filter_set_global_state ($filtername, $state, $move=0) | |
Set the global activated state for a text filter. More... | |
filter_set_local_config ($filter, $contextid, $name, $value) | |
Set a particular local config variable for a filter in a context. More... | |
filter_set_local_state ($filter, $contextid, $state) | |
Set the local activated state for a text filter. More... | |
filter_unset_local_config ($filter, $contextid, $name) | |
Remove a particular local config variable for a filter in a context. More... | |
Variables | |
const | TEXTFILTER_DISABLED -9999 |
The states a filter can be in, stored in the filter_active table. | |
const | TEXTFILTER_EXCL_SEPARATOR chr(0x1F) . '%' . chr(0x1F) |
Define one exclusive separator that we'll use in the temp saved tags keys. More... | |
const | TEXTFILTER_INHERIT 0 |
The states a filter can be in, stored in the filter_active table. | |
const | TEXTFILTER_OFF -1 |
The states a filter can be in, stored in the filter_active table. | |
const | TEXTFILTER_ON 1 |
The states a filter can be in, stored in the filter_active table. | |
Library functions for managing text filter plugins.