HTMLPurifier_Printer_ConfigForm
extends HTMLPurifier_Printer
in package
Tags
Table of Contents
Properties
- $compress : mixed
- Whether or not to compress directive names, clipping them off after a certain amount of letters. False to disable or integer letters before clipping.
- $config : mixed
- For easy access.
- $docURL : mixed
- Documentation URL, can have fragment tagged on end.
- $fields : mixed
- Printers for specific fields.
- $genConfig : HTMLPurifier_Config
- $generator : mixed
- For HTML generation convenience funcs.
- $name : mixed
- Name of form element to stuff config in.
Methods
- __construct() : mixed
- Initialize $generator.
- getCSS() : mixed
- Retrieves styling, in case it is not accessible by webserver
- getJavaScript() : mixed
- Retrieves JavaScript, in case it is not accessible by webserver
- prepareGenerator() : mixed
- Give generator necessary configuration if possible
- render() : string
- Returns HTML output for a configuration form
- setTextareaDimensions() : mixed
- Sets default column and row size for textareas in sub-printers
- element() : string
- Prints a complete element with content inside
- elementEmpty() : string
- end() : string
- Returns an end tag
- escape() : string
- Escapes a string for HTML output.
- getClass() : string
- Retrieves the class of an object without prefixes, as well as metadata
- listify() : string
- Takes a list of strings and turns them into a single list
- renderNamespace() : string
- Renders a single namespace
- row() : string
- Prints a simple key/value row in a table.
- start() : string
- Returns a start tag
- text() : string
Properties
$compress
Whether or not to compress directive names, clipping them off after a certain amount of letters. False to disable or integer letters before clipping.
protected
mixed
$compress
= \false
Tags
$config
For easy access.
protected
mixed
$config
Tags
$docURL
Documentation URL, can have fragment tagged on end.
protected
mixed
$docURL
Tags
$fields
Printers for specific fields.
protected
mixed
$fields
= array()
Tags
$genConfig
protected
HTMLPurifier_Config
$genConfig
$generator
For HTML generation convenience funcs.
protected
mixed
$generator
Tags
$name
Name of form element to stuff config in.
protected
mixed
$name
Tags
Methods
__construct()
Initialize $generator.
public
__construct(string $name[, string $doc_url = null ][, bool $compress = false ]) : mixed
Parameters
- $name : string
-
Form element name for directives to be stuffed into
- $doc_url : string = null
-
String documentation URL, will have fragment tagged on
- $compress : bool = false
-
Integer max length before compressing a directive name, set to false to turn off
getCSS()
Retrieves styling, in case it is not accessible by webserver
public
static getCSS() : mixed
getJavaScript()
Retrieves JavaScript, in case it is not accessible by webserver
public
static getJavaScript() : mixed
prepareGenerator()
Give generator necessary configuration if possible
public
prepareGenerator(HTMLPurifier_Config $config) : mixed
Parameters
- $config : HTMLPurifier_Config
render()
Returns HTML output for a configuration form
public
render(HTMLPurifier_Config|array<string|int, mixed> $config[, array<string|int, mixed>|bool $allowed = true ][, bool $render_controls = true ]) : string
Parameters
- $config : HTMLPurifier_Config|array<string|int, mixed>
-
Configuration object of current form state, or an array where [0] has an HTML namespace and [1] is being rendered.
- $allowed : array<string|int, mixed>|bool = true
-
Optional namespace(s) and directives to restrict form to.
- $render_controls : bool = true
Return values
stringsetTextareaDimensions()
Sets default column and row size for textareas in sub-printers
public
setTextareaDimensions([mixed $cols = null ][, mixed $rows = null ]) : mixed
Parameters
- $cols : mixed = null
-
Integer columns of textarea, null to use default
- $rows : mixed = null
-
Integer rows of textarea, null to use default
element()
Prints a complete element with content inside
protected
element(string $tag, string $contents[, array<string|int, mixed> $attr = array() ][, bool $escape = true ]) : string
Parameters
- $tag : string
-
Tag name
- $contents : string
-
Element contents
- $attr : array<string|int, mixed> = array()
-
Tag attributes
- $escape : bool = true
-
whether or not to escape contents
Return values
stringelementEmpty()
protected
elementEmpty(string $tag[, array<string|int, mixed> $attr = array() ]) : string
Parameters
- $tag : string
- $attr : array<string|int, mixed> = array()
Return values
stringend()
Returns an end tag
protected
end(string $tag) : string
Parameters
- $tag : string
-
Tag name
Return values
stringescape()
Escapes a string for HTML output.
protected
escape(string $string) : string
Parameters
- $string : string
-
String to escape
Return values
stringgetClass()
Retrieves the class of an object without prefixes, as well as metadata
protected
getClass(object $obj[, string $sec_prefix = '' ]) : string
Parameters
- $obj : object
-
Object to determine class of
- $sec_prefix : string = ''
-
Further prefix to remove
Return values
stringlistify()
Takes a list of strings and turns them into a single list
protected
listify(array<string|int, string> $array[, bool $polite = false ]) : string
Parameters
- $array : array<string|int, string>
-
List of strings
- $polite : bool = false
-
Bool whether or not to add an end before the last
Return values
stringrenderNamespace()
Renders a single namespace
protected
renderNamespace(mixed $ns, array<string|int, mixed> $directives) : string
Parameters
- $ns : mixed
-
String namespace name
- $directives : array<string|int, mixed>
-
array of directives to values
Return values
stringrow()
Prints a simple key/value row in a table.
protected
row(string $name, mixed $value) : string
Parameters
- $name : string
-
Key
- $value : mixed
-
Value
Return values
stringstart()
Returns a start tag
protected
start(string $tag[, array<string|int, mixed> $attr = array() ]) : string
Parameters
- $tag : string
-
Tag name
- $attr : array<string|int, mixed> = array()
-
Attribute array
Return values
stringtext()
protected
text(string $text) : string
Parameters
- $text : string