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
$handlerUri
protected
string
$handlerUri
$items
protected
JavaScriptItems
$items
$requireJS
protected
RequireJS|null
$requireJS
= null
__construct()
public
__construct(string $handlerUri) : mixed
Parameters
-
$handlerUri
: string
-
addGlobalAssignment()
public
addGlobalAssignment(array<string|int, mixed> $payload) : void
Parameters
-
$payload
: array<string|int, mixed>
-
addJavaScriptModuleInstruction()
public
addJavaScriptModuleInstruction(JavaScriptModuleInstruction $instruction) : void
Parameters
-
$instruction
: JavaScriptModuleInstruction
-
create()
public
static create([string|null $uri = null ]) : self
Parameters
-
$uri
: string|null
= null
-
loadRequireJS()
public
loadRequireJS(RequireJS $requireJS) : void
Parameters
-
$requireJS
: RequireJS
-
render()
public
render() : string
toArray()
public
toArray() : array<int, array{type: string, payload: mixed}>
Return values
array<int, array{type: string, payload: mixed}>
createScriptElement()
protected
createScriptElement(array<string|int, mixed> $attributes[, string $textContent = '' ]) : string
Parameters
-
$attributes
: array<string|int, mixed>
-
-
$textContent
: string
= ''
-
isEmpty()
protected
isEmpty() : bool
jsonEncode()
protected
jsonEncode(mixed $value) : string
Parameters
-
$value
: mixed
-