StyleAttrViewHelper

final class \TYPO3\CMS\Fluid\ViewHelpers\Asset\StyleAttrViewHelper

Extends
AbstractViewHelper

ViewHelper for inline style attributes that need CSP hash coverage via `style-src-attr`.

When csp is true (default), the style value is hashed and registered with the HashCollection so that the CSP header includes the corresponding sha256-... hash.

Usage:

   <div style="{f:asset.styleAttr(value: 'color: green; text-decoration: underline;', csp: true)}">...</div>

Tags

see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-asset-styleattr

Table of Contents

Methods

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

Methods

initializeArguments()

public initializeArguments() : void

render()

public render() : string

Return values

string
On this page