|
| __construct () |
| Performs low-cost, preliminary initialization.
|
|
| addAttribute ($element_name, $attr_name, $def) |
| Adds a custom attribute to a pre-existing element.
|
|
| addBlankElement ($element_name) |
| Adds a blank element to your HTML definition, for overriding existing behavior.
|
|
| addElement ($element_name, $type, $contents, $attr_collections, $attributes=array()) |
| Adds a custom element to your HTML definition.
|
|
| getAnonymousModule () |
| Retrieves a reference to the anonymous module, so you can bust out advanced features without having to make your own module.
|
|
| parseTinyMCEAllowedList ($list) |
| Parses a TinyMCE-flavored Allowed Elements and Attributes list into separate lists for processing.
|
|
| setup ($config) |
| Setup function that aborts if already setup.
|
|
◆ addAttribute()
HTMLPurifier_HTMLDefinition::addAttribute |
( |
| $element_name, |
|
|
| $attr_name, |
|
|
| $def ) |
Adds a custom attribute to a pre-existing element.
- Note
- This is strictly convenience, and does not have a corresponding method in HTMLPurifier_HTMLModule
- Parameters
-
string | $element_name | Element name to add attribute to |
string | $attr_name | Name of attribute |
mixed | $def | Attribute definition, can be string or object, see HTMLPurifier_AttrTypes for details |
◆ addBlankElement()
HTMLPurifier_HTMLDefinition::addBlankElement |
( |
| $element_name | ) |
|
Adds a blank element to your HTML definition, for overriding existing behavior.
- Parameters
-
- Return values
-
- See also
- HTMLPurifier_HTMLModule\addBlankElement() for detailed parameter and return value descriptions.
◆ addElement()
HTMLPurifier_HTMLDefinition::addElement |
( |
| $element_name, |
|
|
| $type, |
|
|
| $contents, |
|
|
| $attr_collections, |
|
|
| $attributes = array() ) |
◆ doSetup()
HTMLPurifier_HTMLDefinition::doSetup |
( |
| $config | ) |
|
|
protected |
◆ getAnonymousModule()
HTMLPurifier_HTMLDefinition::getAnonymousModule |
( |
| ) |
|
Retrieves a reference to the anonymous module, so you can bust out advanced features without having to make your own module.
- Return values
-
◆ parseTinyMCEAllowedList()
HTMLPurifier_HTMLDefinition::parseTinyMCEAllowedList |
( |
| $list | ) |
|
Parses a TinyMCE-flavored Allowed Elements and Attributes list into separate lists for processing.
Format is element[attr1|attr2],element2...
- Warning
- Although it's largely drawn from TinyMCE's implementation, it is different, and you'll probably have to modify your lists
- Parameters
-
array | $list | String list to parse |
- Return values
-
- Todo
- Give this its own class, probably static interface
◆ processModules()
HTMLPurifier_HTMLDefinition::processModules |
( |
| $config | ) |
|
|
protected |
Extract out the information from the manager.
- Parameters
-
◆ setup()
HTMLPurifier_Definition::setup |
( |
| $config | ) |
|
|
inherited |
Setup function that aborts if already setup.
- Parameters
-
◆ setupConfigStuff()
HTMLPurifier_HTMLDefinition::setupConfigStuff |
( |
| $config | ) |
|
|
protected |
Sets up stuff based on config.
We need a better way of doing this.
- Parameters
-
◆ $info
HTMLPurifier_HTMLDefinition::$info = array() |
◆ $info_attr_transform_post
HTMLPurifier_HTMLDefinition::$info_attr_transform_post = array() |
◆ $info_attr_transform_pre
HTMLPurifier_HTMLDefinition::$info_attr_transform_pre = array() |
◆ $info_block_wrapper
HTMLPurifier_HTMLDefinition::$info_block_wrapper = 'p' |
String name of element used to wrap inline elements in block context.
@type string
- Note
- This is rarely used except for BLOCKQUOTEs in strict mode
◆ $info_content_sets
HTMLPurifier_HTMLDefinition::$info_content_sets = array() |
Nested lookup array of content set name (Block, Inline) to element name to whether or not it belongs in that content set.
@type array
◆ $info_global_attr
HTMLPurifier_HTMLDefinition::$info_global_attr = array() |
Associative array of global attribute name to attribute definition.
@type array
◆ $info_injector
HTMLPurifier_HTMLDefinition::$info_injector = array() |
◆ $info_parent
HTMLPurifier_HTMLDefinition::$info_parent = 'div' |
String name of parent element HTML will be going into.
@type string
◆ $info_parent_def
HTMLPurifier_HTMLDefinition::$info_parent_def |
Definition for parent element, allows parent element to be a tag that's not allowed inside the HTML fragment.
@type HTMLPurifier_ElementDef
◆ $info_tag_transform
HTMLPurifier_HTMLDefinition::$info_tag_transform = array() |
◆ $optimized
HTMLPurifier_Definition::$optimized = null |
|
inherited |
If true, write out the final definition object to the cache after setup.
This will be true only if all invocations to get a raw definition object are also optimized. This does not cause file system thrashing because on subsequent calls the cached object is used and any writes to the raw definition object are short circuited. See enduser-customize.html for the high-level picture. @type bool
The documentation for this class was generated from the following file:
- lib/htmlpurifier/HTMLPurifier/HTMLDefinition.php