Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
filter_displayh5p Class Reference

Display H5P filter. More...

Inheritance diagram for filter_displayh5p:
moodle_text_filter

Public Member Functions

 filter ($text, array $options=array())
 Function filter replaces any h5p-sources. More...
 
 filterobject_prepare_replacement_callback ($tagbegin, $tagend, $urlmodifier)
 Callback used by filterobject / filter_phrases. More...
 
 hash ()
 
 setup ($page, $context)
 Setup page with filter requirements and other prepare stuff. More...
 

Protected Attributes

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

Detailed Description

Display H5P filter.

This filter will replace any occurrence of H5P URLs with the corresponding H5P content embed code

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

Member Function Documentation

◆ filter()

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

Function filter replaces any h5p-sources.

Parameters
string$textHTML content to process
array$optionsoptions passed to the filters
Return values
string

Reimplemented from moodle_text_filter.

◆ filterobject_prepare_replacement_callback()

filter_displayh5p::filterobject_prepare_replacement_callback (   $tagbegin,
  $tagend,
  $urlmodifier 
)

Callback used by filterobject / filter_phrases.

Parameters
string$tagbeginHTML to insert before any match
string$tagendHTML to insert after any match
string$urlmodifierstring to add to the match URL
Return values
array[$hreftagbegin, $hreftagend, $replacementphrase] for filterobject.

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