Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

Differences Between: [Versions 400 and 401] [Versions 400 and 402] [Versions 400 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.

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

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

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

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

return: array