ScriptViewHelper extends AbstractTagBasedViewHelper
This class is the implementation of a Fluid ViewHelper.
View this class in the TYPO3 ViewHelper reference: <f:asset.script>
ScriptViewHelper
Examples
::
<f:asset.script identifier="identifier123" src="EXT:my_ext/Resources/Public/JavaScript/foo.js" /> <f:asset.script identifier="identifier123"> alert('hello world'); </f:asset.script>
Table of Contents
Properties
- $assetCollector : AssetCollector
- $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
- initialize() : mixed
- initializeArguments() : void
- injectAssetCollector() : void
- render() : string
Properties
$assetCollector
protected
AssetCollector
$assetCollector
$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
initialize()
public
initialize() : mixed
initializeArguments()
public
initializeArguments() : void
APIYes
injectAssetCollector()
public
injectAssetCollector(AssetCollector $assetCollector) : void
Parameters
- $assetCollector : AssetCollector
render()
public
render() : string