HTMLPurifier 4.4.0
HTMLPurifier_Printer_ConfigForm Class Reference
Inheritance diagram for HTMLPurifier_Printer_ConfigForm:
HTMLPurifier_Printer

List of all members.

Public Member Functions

 __construct ($name, $doc_url=null, $compress=false)
 setTextareaDimensions ($cols=null, $rows=null)
 Sets default column and row size for textareas in sub-printers.
 render ($config, $allowed=true, $render_controls=true)
 Returns HTML output for a configuration form.

Static Public Member Functions

static getCSS ()
 Retrieves styling, in case it is not accessible by webserver.
static getJavaScript ()
 Retrieves JavaScript, in case it is not accessible by webserver.

Protected Member Functions

 renderNamespace ($ns, $directives)
 Renders a single namespace.

Protected Attributes

 $fields = array()
 Printers for specific fields.
 $docURL
 Documentation URL, can have fragment tagged on end.
 $name
 Name of form element to stuff config in.
 $compress = false
 Whether or not to compress directive names, clipping them off after a certain amount of letters.

Detailed Description

Todo:
Rewrite to use Interchange objects

Definition at line 6 of file ConfigForm.php.


Constructor & Destructor Documentation

HTMLPurifier_Printer_ConfigForm::__construct ( name,
doc_url = null,
compress = false 
)
Parameters:
$nameForm element name for directives to be stuffed into
$doc_urlString documentation URL, will have fragment tagged on
$compressInteger max length before compressing a directive name, set to false to turn off

Definition at line 36 of file ConfigForm.php.

References $compress, $name, HTMLPurifier_Printer::__construct(), and HTMLPurifier_VarParser::BOOL.


Member Function Documentation

static HTMLPurifier_Printer_ConfigForm::getCSS ( ) [static]

Retrieves styling, in case it is not accessible by webserver.

Definition at line 61 of file ConfigForm.php.

static HTMLPurifier_Printer_ConfigForm::getJavaScript ( ) [static]

Retrieves JavaScript, in case it is not accessible by webserver.

Definition at line 68 of file ConfigForm.php.

HTMLPurifier_Printer_ConfigForm::render ( config,
allowed = true,
render_controls = true 
)

Returns HTML output for a configuration form.

Parameters:
$configConfiguration object of current form state, or an array where [0] has an HTML namespace and [1] is being rendered.
$allowedOptional namespace(s) and directives to restrict form to.

Definition at line 78 of file ConfigForm.php.

References HTMLPurifier_Printer::$config, HTMLPurifier_Printer::element(), HTMLPurifier_Printer::elementEmpty(), HTMLPurifier_Printer::end(), HTMLPurifier_Config::getAllowedDirectivesForForm(), HTMLPurifier_Printer::prepareGenerator(), renderNamespace(), and HTMLPurifier_Printer::start().

HTMLPurifier_Printer_ConfigForm::renderNamespace ( ns,
directives 
) [protected]

Renders a single namespace.

Parameters:
$nsString namespace name
$directiveAssociative array of directives to values

Definition at line 127 of file ConfigForm.php.

References $def, HTMLPurifier_Printer::element(), HTMLPurifier_Printer::end(), and HTMLPurifier_Printer::start().

Referenced by render().

HTMLPurifier_Printer_ConfigForm::setTextareaDimensions ( cols = null,
rows = null 
)

Sets default column and row size for textareas in sub-printers.

Parameters:
$colsInteger columns of textarea, null to use default
$rowsInteger rows of textarea, null to use default

Definition at line 53 of file ConfigForm.php.


Member Data Documentation

HTMLPurifier_Printer_ConfigForm::$compress = false [protected]

Whether or not to compress directive names, clipping them off after a certain amount of letters.

False to disable or integer letters before clipping.

Definition at line 29 of file ConfigForm.php.

Referenced by __construct().

HTMLPurifier_Printer_ConfigForm::$docURL [protected]

Documentation URL, can have fragment tagged on end.

Definition at line 17 of file ConfigForm.php.

HTMLPurifier_Printer_ConfigForm::$fields = array() [protected]

Printers for specific fields.

Definition at line 12 of file ConfigForm.php.

HTMLPurifier_Printer_ConfigForm::$name [protected]

Name of form element to stuff config in.

Definition at line 22 of file ConfigForm.php.

Referenced by __construct().


The documentation for this class was generated from the following file: