JavaScriptRenderer

class \TYPO3\CMS\Core\Page\JavaScriptRenderer

Table of Contents

Properties

$handlerUri  : string
$items  : JavaScriptItems
$requireJS  : RequireJS|null

Methods

__construct()  : mixed
addGlobalAssignment()  : void
addJavaScriptModuleInstruction()  : void
create()  : self
loadRequireJS()  : void
render()  : string
toArray()  : array<int, array{type: string, payload: mixed}>
createScriptElement()  : string
isEmpty()  : bool
jsonEncode()  : string

Properties

Methods

__construct()

public __construct(string $handlerUri) : mixed

Parameters

$handlerUri : string

addGlobalAssignment()

public addGlobalAssignment(array $payload) : void

Parameters

$payload : array

create()

public static create([string|null $uri = null ]) : self

Parameters

$uri : string|null = null

Return values

self

render()

public render() : string

Return values

string

toArray()

public toArray() : array<int, array{type: string, payload: mixed}>

Return values

array<int, array{type: string, payload: mixed}>

createScriptElement()

protected createScriptElement(array $attributes[, string $textContent = '' ]) : string

Parameters

$attributes : array
$textContent : string = ''

Return values

string

isEmpty()

protected isEmpty() : bool

Return values

bool

jsonEncode()

protected jsonEncode(mixed $value) : string

Parameters

$value : mixed

Return values

string
On this page