include/HTMLPurifier/standalone/HTMLPurifier/Printer/ConfigForm.php
\HTMLPurifier_Printer_ConfigForm
- Parent(s)
- \HTMLPurifier_Printer
- Todo
- Rewrite to use Interchange objects
Properties
$compress= 'false'
Whether or not to compress directive names, clipping them off after a certain amount of letters. False to disable or integer letters before clipping.
false
Details- Type
- n/a
$config= ''
Instance of HTMLPurifier_Config, for easy access
Inherited from: \HTMLPurifier_Printer::$$config- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$config
$generator= ''
Instance of HTMLPurifier_Generator for HTML generation convenience funcs
Inherited from: \HTMLPurifier_Printer::$$generator- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$generator
Methods
__construct(
\$name $name, \$doc_url $doc_url
=
null, \$compress $compress
=
false
)
:
void
Initialize $generator.
Name | Type | Description |
---|---|---|
$name | \$name | Form element name for directives to be stuffed into |
$doc_url | \$doc_url | String documentation URL, will have fragment tagged on |
$compress | \$compress | Integer max length before compressing a directive name, set to false to turn off |
element(
\$tag $tag, \$contents $contents, \$attr $attr
=
array(), \$escape $escape
=
true
)
:
void
Prints a complete element with content inside
Inherited from: \HTMLPurifier_Printer::element()Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$contents | \$contents | Element contents |
$attr | \$attr | Tag attributes |
$escape | \$escape | Bool whether or not to escape contents |
elementEmpty(
$tag, $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | ||
$attr |
escape(
\$string $string
)
:
void
Name | Type | Description |
---|---|---|
$string | \$string | String to escape |
getClass(
\$obj $obj, \$prefix $sec_prefix
=
''
)
:
void
Retrieves the class of an object without prefixes, as well as metadata
Inherited from: \HTMLPurifier_Printer::getClass()Name | Type | Description |
---|---|---|
$obj | \$obj | Object to determine class of |
$sec_prefix | \$prefix | Further prefix to remove |
listify(
\$array $array, \$polite $polite
=
false
)
:
void
Takes a list of strings and turns them into a single list
Inherited from: \HTMLPurifier_Printer::listify()Name | Type | Description |
---|---|---|
$array | \$array | List of strings |
$polite | \$polite | Bool whether or not to add an end before the last |
prepareGenerator(
$config
)
:
void
Give generator necessary configuration if possible
Inherited from: \HTMLPurifier_Printer::prepareGenerator()Name | Type | Description |
---|---|---|
$config |
render(
\$config $config, \$allowed $allowed
=
true, $render_controls
=
true
)
:
void
Returns HTML output for a configuration form
Name | Type | Description |
---|---|---|
$config | \$config | Configuration object of current form state, or an array where [0] has an HTML namespace and [1] is being rendered. |
$allowed | \$allowed | Optional namespace(s) and directives to restrict form to. |
$render_controls |
renderNamespace(
\$ns $ns, \$directive $directives
)
:
void
Renders a single namespace
Name | Type | Description |
---|---|---|
$ns | \$ns | String namespace name |
$directives | \$directive | Associative array of directives to values |
row(
\$name $name, \$value $value
)
:
void
Name | Type | Description |
---|---|---|
$name | \$name | Key |
$value | \$value | Value |
setTextareaDimensions(
\$cols $cols
=
null, \$rows $rows
=
null
)
:
void
Sets default column and row size for textareas in sub-printers
Name | Type | Description |
---|---|---|
$cols | \$cols | Integer columns of textarea, null to use default |
$rows | \$rows | Integer rows of textarea, null to use default |
start(
\$tag $tag, \$attr $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$attr | \$attr | Attribute array |
text(
$text
)
:
void
Name | Type | Description |
---|---|---|
$text |
\HTMLPurifier_Printer_ConfigForm_NullDecorator
Printer decorator for directives that accept null
- Parent(s)
- \HTMLPurifier_Printer
Properties
$config= ''
Instance of HTMLPurifier_Config, for easy access
Inherited from: \HTMLPurifier_Printer::$$config- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$config
$generator= ''
Instance of HTMLPurifier_Generator for HTML generation convenience funcs
Inherited from: \HTMLPurifier_Printer::$$generator- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$generator
Methods
__construct(
\$obj $obj
)
:
void
Initialize $generator.
Name | Type | Description |
---|---|---|
$obj | \$obj | Printer to decorate |
element(
\$tag $tag, \$contents $contents, \$attr $attr
=
array(), \$escape $escape
=
true
)
:
void
Prints a complete element with content inside
Inherited from: \HTMLPurifier_Printer::element()Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$contents | \$contents | Element contents |
$attr | \$attr | Tag attributes |
$escape | \$escape | Bool whether or not to escape contents |
elementEmpty(
$tag, $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | ||
$attr |
escape(
\$string $string
)
:
void
Name | Type | Description |
---|---|---|
$string | \$string | String to escape |
getClass(
\$obj $obj, \$prefix $sec_prefix
=
''
)
:
void
Retrieves the class of an object without prefixes, as well as metadata
Inherited from: \HTMLPurifier_Printer::getClass()Name | Type | Description |
---|---|---|
$obj | \$obj | Object to determine class of |
$sec_prefix | \$prefix | Further prefix to remove |
listify(
\$array $array, \$polite $polite
=
false
)
:
void
Takes a list of strings and turns them into a single list
Inherited from: \HTMLPurifier_Printer::listify()Name | Type | Description |
---|---|---|
$array | \$array | List of strings |
$polite | \$polite | Bool whether or not to add an end before the last |
prepareGenerator(
$config
)
:
void
Give generator necessary configuration if possible
Inherited from: \HTMLPurifier_Printer::prepareGenerator()Name | Type | Description |
---|---|---|
$config |
render(
$ns, $directive, $value, $name, $config
)
:
void
Name | Type | Description |
---|---|---|
$ns | ||
$directive | ||
$value | ||
$name | ||
$config |
row(
\$name $name, \$value $value
)
:
void
Name | Type | Description |
---|---|---|
$name | \$name | Key |
$value | \$value | Value |
start(
\$tag $tag, \$attr $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$attr | \$attr | Attribute array |
text(
$text
)
:
void
Name | Type | Description |
---|---|---|
$text |
\HTMLPurifier_Printer_ConfigForm_bool
Bool form field printer
- Parent(s)
- \HTMLPurifier_Printer
Properties
$config= ''
Instance of HTMLPurifier_Config, for easy access
Inherited from: \HTMLPurifier_Printer::$$config- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$config
$generator= ''
Instance of HTMLPurifier_Generator for HTML generation convenience funcs
Inherited from: \HTMLPurifier_Printer::$$generator- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$generator
Methods
element(
\$tag $tag, \$contents $contents, \$attr $attr
=
array(), \$escape $escape
=
true
)
:
void
Prints a complete element with content inside
Inherited from: \HTMLPurifier_Printer::element()Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$contents | \$contents | Element contents |
$attr | \$attr | Tag attributes |
$escape | \$escape | Bool whether or not to escape contents |
elementEmpty(
$tag, $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | ||
$attr |
escape(
\$string $string
)
:
void
Name | Type | Description |
---|---|---|
$string | \$string | String to escape |
getClass(
\$obj $obj, \$prefix $sec_prefix
=
''
)
:
void
Retrieves the class of an object without prefixes, as well as metadata
Inherited from: \HTMLPurifier_Printer::getClass()Name | Type | Description |
---|---|---|
$obj | \$obj | Object to determine class of |
$sec_prefix | \$prefix | Further prefix to remove |
listify(
\$array $array, \$polite $polite
=
false
)
:
void
Takes a list of strings and turns them into a single list
Inherited from: \HTMLPurifier_Printer::listify()Name | Type | Description |
---|---|---|
$array | \$array | List of strings |
$polite | \$polite | Bool whether or not to add an end before the last |
prepareGenerator(
$config
)
:
void
Give generator necessary configuration if possible
Inherited from: \HTMLPurifier_Printer::prepareGenerator()Name | Type | Description |
---|---|---|
$config |
render(
$ns, $directive, $value, $name, $config
)
:
void
Name | Type | Description |
---|---|---|
$ns | ||
$directive | ||
$value | ||
$name | ||
$config |
row(
\$name $name, \$value $value
)
:
void
Name | Type | Description |
---|---|---|
$name | \$name | Key |
$value | \$value | Value |
start(
\$tag $tag, \$attr $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$attr | \$attr | Attribute array |
text(
$text
)
:
void
Name | Type | Description |
---|---|---|
$text |
\HTMLPurifier_Printer_ConfigForm_default
Swiss-army knife configuration form field printer
- Parent(s)
- \HTMLPurifier_Printer
Properties
$config= ''
Instance of HTMLPurifier_Config, for easy access
Inherited from: \HTMLPurifier_Printer::$$config- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$config
$generator= ''
Instance of HTMLPurifier_Generator for HTML generation convenience funcs
Inherited from: \HTMLPurifier_Printer::$$generator- Type
- n/a
- Inherited_from
- \HTMLPurifier_Printer::$$generator
Methods
element(
\$tag $tag, \$contents $contents, \$attr $attr
=
array(), \$escape $escape
=
true
)
:
void
Prints a complete element with content inside
Inherited from: \HTMLPurifier_Printer::element()Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$contents | \$contents | Element contents |
$attr | \$attr | Tag attributes |
$escape | \$escape | Bool whether or not to escape contents |
elementEmpty(
$tag, $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | ||
$attr |
escape(
\$string $string
)
:
void
Name | Type | Description |
---|---|---|
$string | \$string | String to escape |
getClass(
\$obj $obj, \$prefix $sec_prefix
=
''
)
:
void
Retrieves the class of an object without prefixes, as well as metadata
Inherited from: \HTMLPurifier_Printer::getClass()Name | Type | Description |
---|---|---|
$obj | \$obj | Object to determine class of |
$sec_prefix | \$prefix | Further prefix to remove |
listify(
\$array $array, \$polite $polite
=
false
)
:
void
Takes a list of strings and turns them into a single list
Inherited from: \HTMLPurifier_Printer::listify()Name | Type | Description |
---|---|---|
$array | \$array | List of strings |
$polite | \$polite | Bool whether or not to add an end before the last |
prepareGenerator(
$config
)
:
void
Give generator necessary configuration if possible
Inherited from: \HTMLPurifier_Printer::prepareGenerator()Name | Type | Description |
---|---|---|
$config |
render(
$ns, $directive, $value, $name, $config
)
:
void
Name | Type | Description |
---|---|---|
$ns | ||
$directive | ||
$value | ||
$name | ||
$config |
row(
\$name $name, \$value $value
)
:
void
Name | Type | Description |
---|---|---|
$name | \$name | Key |
$value | \$value | Value |
start(
\$tag $tag, \$attr $attr
=
array()
)
:
void
Name | Type | Description |
---|---|---|
$tag | \$tag | Tag name |
$attr | \$attr | Attribute array |
text(
$text
)
:
void
Name | Type | Description |
---|---|---|
$text |