ScriptViewHelper extends AbstractTagBasedViewHelper

ViewHelper

This class is the implementation of a Fluid ViewHelper.

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

FinalYes

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

   <f:asset.script identifier="identifier123" src="EXT:my_ext/Resources/Public/JavaScript/foo.js" inline="0" />
   <f:asset.script identifier="identifier123">
      alert('hello world');
   </f:asset.script>
Tags
see
https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-asset-script

Table of Contents

Properties

$escapeChildren  : bool
Rendered children string is passed as JavaScript 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
render()  : string

Properties

$escapeChildren

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

protected bool $escapeChildren = false

$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

render()

public render() : string
Return values
string

        
On this page

Search results