Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Differences Between: [Versions 311 and 401] [Versions 311 and 402] [Versions 311 and 403]

(no description)

File Size: 230 lines (8 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