Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

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