Moodle PHP Documentation 4.2
Moodle 4.2.8 (Build: 20240610) (2d41ac46f45)
filter_urltolink Class Reference
Inheritance diagram for filter_urltolink:
moodle_text_filter

Public Member Functions

 filter ($text, array $options=array())
 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 Member Functions

 convert_urls_into_links (&$text)
 Given some text this function converts any URLs it finds into HTML links.
 

Protected Attributes

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

Static Protected Attributes

static array $globalconfig
 global configuration for this filter
 

Member Function Documentation

◆ convert_urls_into_links()

filter_urltolink::convert_urls_into_links ( & $text)
protected

Given some text this function converts any URLs it finds into HTML links.

Parameters
string$textPassed in by reference. The string to be searched for urls.

◆ filter()

filter_urltolink::filter ( $text,
array $options = array() )

Apply the filter to the text.

See also
filter_manager\apply_filter_chain()
Parameters
string$textto be processed by the text
array$optionsfilter options
Return values
stringtext after processing

Reimplemented from moodle_text_filter.

Member Data Documentation

◆ $globalconfig

array filter_urltolink::$globalconfig
staticprotected

global configuration for this filter

This might be eventually moved into parent class if we found it useful for other filters, too.


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