StyleAttrViewHelper extends AbstractViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

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

FinalYes

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>

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

Search results