CssViewHelper extends AbstractTagBasedViewHelper implements ViewHelperNodeInitializedEventInterface

ViewHelper

This class is the implementation of a Fluid ViewHelper.

View this class in the TYPO3 ViewHelper reference: <f:asset.css>

FinalYes

ViewHelper to add CSS to the TYPO3 AssetCollector. Either a file or inline CSS can be added.

   <f:asset.css identifier="identifier123" href="EXT:my_ext/Resources/Public/Css/foo.css" inline="0" />
   <f:asset.css identifier="identifier123">
      .foo { color: black; }
   </f:asset.css>
Tags
see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-asset-css

Table of Contents

Interfaces

ViewHelperNodeInitializedEventInterface

Properties

$escapeChildren  : bool
Rendered children string is passed as CSS code, there is no point in HTML encoding anything from that.
$escapeOutput  : bool
This VH does not produce direct output, thus does not need to be wrapped in an escaping node

Methods

__construct()  : mixed
initialize()  : void
initializeArguments()  : void
nodeInitializedEvent()  : void
render()  : string

Properties

$escapeChildren

Rendered children string is passed as CSS code, there is no point in HTML encoding anything from that.

protected bool $escapeChildren = true

$escapeOutput

This VH does not produce direct output, thus does not need to be wrapped in an escaping node

protected bool $escapeOutput = false

Methods

initializeArguments()

public initializeArguments() : void

nodeInitializedEvent()

public static nodeInitializedEvent(ViewHelperNode $node, array<string|int, mixed> $arguments, ParsingState $parsingState) : void
Parameters
$node : ViewHelperNode
$arguments : array<string|int, mixed>
$parsingState : ParsingState

render()

public render() : string
Return values
string
On this page

Search results