Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]

(no description)

File Size: 227 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

HTMLPurifier_HTMLModule_Tidy:: (6 methods):
  setup()
  getFixesForLevel()
  makeFixesForLevel()
  populate()
  getFixType()
  makeFixes()


Class: HTMLPurifier_HTMLModule_Tidy  - X-Ref

Abstract class for a set of proprietary modules that clean up (tidy)
poorly written HTML.

setup($config)   X-Ref
Lazy load constructs the module by determining the necessary
fixes to create and then delegating to the populate() function.

param: HTMLPurifier_Config $config

getFixesForLevel($level)   X-Ref
Retrieves all fixes per a level, returning fixes for that specific
level as well as all levels below it.

param: string $level level identifier, see $levels for valid values
return: array Lookup up table of fixes

makeFixesForLevel($fixes)   X-Ref
Dynamically populates the $fixesForLevel member variable using
the fixes array. It may be custom overloaded, used in conjunction
with $defaultLevel, or not used at all.

param: array $fixes

populate($fixes)   X-Ref
Populates the module with transforms and other special-case code
based on a list of fixes passed to it

param: array $fixes Lookup table of fixes to activate

getFixType($name)   X-Ref
Parses a fix name and determines what kind of fix it is, as well
as other information defined by the fix

param: $name String name of fix
return: array(string $fix_type, array $fix_parameters)

makeFixes()   X-Ref
Defines all fixes the module will perform in a compact
associative array of fix name to fix implementation.

return: array