Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
moodle_text_filter Class Reference

Base class for text filters. More...

Inheritance diagram for moodle_text_filter:
filter_activitynames filter_algebra filter_codehighlighter filter_displayh5p filter_emoticon filter_glossary filter_mathjaxloader filter_mediaplugin filter_multilang filter_tidy filter_urltolink

Public Member Functions

 __construct ($context, array $localconfig)
 Set any context-specific configuration for this filter.
 
 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().
 
 hash ()
 
 setup ($page, $context)
 Setup page with filter requirements and other prepare stuff.
 

Protected Attributes

context $context
 The context we are in.
 
array $localconfig
 Any local configuration for this filter in this context.
 

Detailed Description

Base class for text filters.

You just need to override this class and implement the filter method.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

The documentation for this class was generated from the following file: