PHP Trait FluidTYPO3\Vhs\Traits\TagViewHelperTrait

Trait implemented by ViewHelpers which require access to functions dealing with tag generation. Has the following main responsibilities: - register additional HTML5-specific attributes for tag based ViewHelpers - custom rendering method which applies those attributes.
Datei anzeigen Open project: fluidtypo3/vhs

Public Methods

Method Description
registerArguments ( ) : void Default implementation to register only the tag arguments along with universal attributes.

Protected Methods

Method Description
registerUniversalTagAttributes ( ) : void Registers all standard and HTML5 universal attributes.
renderChildTag ( string $tagName, array $attributes = [], boolean $forceClosingTag = false, string $mode = 'none' ) : string Renders the provided tag and optionally appends or prepends it to the main tag's content depending on 'mode' which can be one of 'none', 'append' or 'prepend'
renderTag ( string $tagName, mixed $content = null, array $attributes = [], array $nonEmptyAttributes = ['id', 'class'] ) : string Renders the provided tag with the given name and any (additional) attributes not already provided as arguments.

Method Details

registerArguments() public method

Default implementation to register only the tag arguments along with universal attributes.
public registerArguments ( ) : void
return void

registerUniversalTagAttributes() protected method

Should be used inside registerArguments();
protected registerUniversalTagAttributes ( ) : void
return void

renderChildTag() protected method

Renders the provided tag and optionally appends or prepends it to the main tag's content depending on 'mode' which can be one of 'none', 'append' or 'prepend'
protected renderChildTag ( string $tagName, array $attributes = [], boolean $forceClosingTag = false, string $mode = 'none' ) : string
$tagName string
$attributes array
$forceClosingTag boolean
$mode string
return string

renderTag() protected method

Renders the provided tag with the given name and any (additional) attributes not already provided as arguments.
protected renderTag ( string $tagName, mixed $content = null, array $attributes = [], array $nonEmptyAttributes = ['id', 'class'] ) : string
$tagName string
$content mixed
$attributes array
$nonEmptyAttributes array
return string