Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)
filter_codehighlighter Class Reference

Code highlighter filter. More...

Inheritance diagram for filter_codehighlighter:

Public Member Functions

 filter ($text, array $options=[])
 Apply the filter to the text.
 
 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

Code highlighter filter.

Filter converting text code into a well-styled block of code.

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

Member Function Documentation

◆ filter()

filter_codehighlighter::filter ( $text,
array $options = [] )

Apply the filter to the text.

Parameters
string$textto be processed by the text
array$optionsfilter options
Return values
stringtext after processing

Reimplemented from moodle_text_filter.


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