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.
Afficher le fichier Open project: fluidtypo3/vhs

Méthodes publiques

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

Méthodes protégées

Méthode 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 méthode

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

registerUniversalTagAttributes() protected méthode

Should be used inside registerArguments();
protected registerUniversalTagAttributes ( ) : void
Résultat void

renderChildTag() protected méthode

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
Résultat string

renderTag() protected méthode

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
Résultat string