TYPO3
7.6
|
Public Member Functions | |
__construct ($tagName= '', $tagContent= '') | |
setTagName ($tagName) | |
getTagName () | |
setContent ($tagContent) | |
getContent () | |
hasContent () | |
forceClosingTag ($forceClosingTag) | |
hasAttribute ($attributeName) | |
getAttribute ($attributeName) | |
getAttributes () | |
addAttribute ($attributeName, $attributeValue, $escapeSpecialCharacters=true) | |
addAttributes (array $attributes, $escapeSpecialCharacters=true) | |
removeAttribute ($attributeName) | |
reset () | |
render () | |
Protected Attributes | |
$tagName = '' | |
$content = '' | |
$attributes = array() | |
$forceClosingTag = false | |
Tag builder. Can be easily accessed in AbstractTagBasedViewHelper
Definition at line 19 of file TagBuilder.php.
__construct | ( | $tagName = '' , |
|
$tagContent = '' |
|||
) |
Constructor
string | $tagName | name of the tag to be rendered |
string | $tagContent | content of the tag to be rendered |
Definition at line 57 of file TagBuilder.php.
References TagBuilder\$tagName, TagBuilder\setContent(), and TagBuilder\setTagName().
addAttribute | ( | $attributeName, | |
$attributeValue, | |||
$escapeSpecialCharacters = true |
|||
) |
Adds an attribute to the $attributes-collection
string | $attributeName | name of the attribute to be added to the tag |
string | $attributeValue | attribute value |
bool | $escapeSpecialCharacters | apply htmlspecialchars to attribute value |
Definition at line 182 of file TagBuilder.php.
Referenced by TagBuilder\addAttributes().
addAttributes | ( | array | $attributes, |
$escapeSpecialCharacters = true |
|||
) |
Adds attributes to the $attributes-collection
array | $attributes | collection of attributes to add. key = attribute name, value = attribute value |
bool | $escapeSpecialCharacters | apply htmlspecialchars to attribute values# |
Definition at line 198 of file TagBuilder.php.
References TagBuilder\addAttribute().
forceClosingTag | ( | $forceClosingTag | ) |
Set this to TRUE to force a closing tag E.g. <textarea> cant be self-closing even if its empty
bool | $forceClosingTag |
Definition at line 130 of file TagBuilder.php.
References TagBuilder\$forceClosingTag.
Referenced by TagBuilder\render(), and TagBuilder\reset().
getAttribute | ( | $attributeName | ) |
Get an attribute from the $attributes-collection
string | $attributeName | name of the attribute |
Definition at line 154 of file TagBuilder.php.
References TagBuilder\hasAttribute().
getAttributes | ( | ) |
Get all attribute from the $attributes-collection
Definition at line 168 of file TagBuilder.php.
References TagBuilder\$attributes.
getContent | ( | ) |
Gets the content of the tag
Definition at line 104 of file TagBuilder.php.
References TagBuilder\$content.
getTagName | ( | ) |
Gets the tag name
Definition at line 81 of file TagBuilder.php.
References TagBuilder\$tagName.
hasAttribute | ( | $attributeName | ) |
Returns TRUE if the tag has an attribute with the given name
string | $attributeName | name of the attribute |
Definition at line 142 of file TagBuilder.php.
Referenced by TagBuilder\getAttribute().
hasContent | ( | ) |
Returns TRUE if tag contains content, otherwise FALSE
Definition at line 115 of file TagBuilder.php.
Referenced by TagBuilder\render().
removeAttribute | ( | $attributeName | ) |
Removes an attribute from the $attributes-collection
string | $attributeName | name of the attribute to be removed from the tag |
Definition at line 212 of file TagBuilder.php.
render | ( | ) |
Renders and returns the tag
Definition at line 237 of file TagBuilder.php.
References TagBuilder\$tagName, TagBuilder\forceClosingTag(), and TagBuilder\hasContent().
reset | ( | ) |
Resets the TagBuilder by setting all members to their default value
Definition at line 223 of file TagBuilder.php.
References TagBuilder\forceClosingTag().
setContent | ( | $tagContent | ) |
Sets the content of the tag
string | $tagContent | content of the tag to be rendered |
Definition at line 93 of file TagBuilder.php.
Referenced by TagBuilder\__construct().
setTagName | ( | $tagName | ) |
Sets the tag name
string | $tagName | name of the tag to be rendered |
Definition at line 70 of file TagBuilder.php.
References TagBuilder\$tagName.
Referenced by TagBuilder\__construct().
|
protected |
Definition at line 40 of file TagBuilder.php.
Referenced by TagBuilder\getAttributes().
|
protected |
Definition at line 33 of file TagBuilder.php.
Referenced by TagBuilder\getContent().
|
protected |
Definition at line 48 of file TagBuilder.php.
Referenced by TagBuilder\forceClosingTag().
|
protected |
Definition at line 26 of file TagBuilder.php.
Referenced by TagBuilder\__construct(), TagBuilder\getTagName(), TagBuilder\render(), and TagBuilder\setTagName().