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 401 and 402] [Versions 401 and 403]

(no description)

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

Defines 4 classes

HTMLPurifier_Printer_ConfigForm:: (6 methods):
  __construct()
  setTextareaDimensions()
  getCSS()
  getJavaScript()
  render()
  renderNamespace()

HTMLPurifier_Printer_ConfigForm_NullDecorator:: (2 methods):
  __construct()
  render()

HTMLPurifier_Printer_ConfigForm_default:: (1 method):
  render()

HTMLPurifier_Printer_ConfigForm_bool:: (1 method):
  render()


Class: HTMLPurifier_Printer_ConfigForm  - X-Ref


__construct($name,$doc_url = null,$compress = false)   X-Ref

param: string $name Form element name for directives to be stuffed into
param: string $doc_url String documentation URL, will have fragment tagged on
param: bool $compress Integer max length before compressing a directive name, set to false to turn off

setTextareaDimensions($cols = null, $rows = null)   X-Ref
Sets default column and row size for textareas in sub-printers

param: $cols Integer columns of textarea, null to use default
param: $rows Integer rows of textarea, null to use default

getCSS()   X-Ref
Retrieves styling, in case it is not accessible by webserver


getJavaScript()   X-Ref
Retrieves JavaScript, in case it is not accessible by webserver


render($config, $allowed = true, $render_controls = true)   X-Ref
Returns HTML output for a configuration form

param: HTMLPurifier_Config|array $config Configuration object of current form state, or an array
param: array|bool $allowed Optional namespace(s) and directives to restrict form to.
param: bool $render_controls
return: string

renderNamespace($ns, $directives)   X-Ref
Renders a single namespace

param: $ns String namespace name
param: array $directives array of directives to values
return: string

Class: HTMLPurifier_Printer_ConfigForm_NullDecorator  - X-Ref

Printer decorator for directives that accept null

__construct($obj)   X-Ref

param: HTMLPurifier_Printer $obj Printer to decorate

render($ns, $directive, $value, $name, $config)   X-Ref

param: string $ns
param: string $directive
param: string $value
param: string $name
param: HTMLPurifier_Config|array $config
return: string

Class: HTMLPurifier_Printer_ConfigForm_default  - X-Ref

Swiss-army knife configuration form field printer

render($ns, $directive, $value, $name, $config)   X-Ref

param: string $ns
param: string $directive
param: string $value
param: string $name
param: HTMLPurifier_Config|array $config
return: string

Class: HTMLPurifier_Printer_ConfigForm_bool  - X-Ref

Bool form field printer

render($ns, $directive, $value, $name, $config)   X-Ref

param: string $ns
param: string $directive
param: string $value
param: string $name
param: HTMLPurifier_Config|array $config
return: string