JavaScriptRenderer

Table of Contents

Properties

$handlerUri  : string
$importMap  : ImportMap
$items  : JavaScriptItems
$javaScriptModuleInstructionFlags  : int

Methods

__construct()  : mixed
addGlobalAssignment()  : void
addJavaScriptModuleInstruction()  : void
create()  : self
getState()  : array<string|int, mixed>
hasImportMap()  : bool
hasRequirejs()  : bool
includeAllImports()  : void
HEADS UP: Do only use in authenticated mode as this discloses as installed extensions
includeTaggedImports()  : void
render()  : string
renderImportMap()  : string
toArray()  : array<int, array{type: string, payload: mixed}>
updateState()  : void
createScriptElement()  : string
isEmpty()  : bool
jsonEncode()  : string

Properties

$javaScriptModuleInstructionFlags

protected int $javaScriptModuleInstructionFlags = 0

Methods

__construct()

public __construct(string $handlerUri) : mixed
Parameters
$handlerUri : string

addGlobalAssignment()

public addGlobalAssignment(array<string|int, mixed> $payload) : void
Parameters
$payload : array<string|int, mixed>

create()

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

getState()

public getState() : array<string|int, mixed>
Internal
Return values
array<string|int, mixed>

hasImportMap()

public hasImportMap() : bool
Return values
bool

hasRequirejs()

public hasRequirejs() : bool
Return values
bool

includeAllImports()

HEADS UP: Do only use in authenticated mode as this discloses as installed extensions

public includeAllImports() : void

includeTaggedImports()

public includeTaggedImports(string $tag) : void
Parameters
$tag : string

renderImportMap()

public renderImportMap(string $sitePath[, null|string|ConsumableNonce $nonce = null ]) : string
Parameters
$sitePath : string
$nonce : null|string|ConsumableNonce = null
Return values
string

toArray()

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

updateState()

public updateState(array<string|int, mixed> $state) : void
Parameters
$state : array<string|int, mixed>
Internal

createScriptElement()

protected createScriptElement(array<string|int, mixed> $attributes[, string $textContent = '' ]) : string
Parameters
$attributes : array<string|int, mixed>
$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

Search results