HtmlBlockInterface
extends
ContentBlockInterface
in
Interface HtmlBlockInterface
Table of Contents
Methods
- __construct() : mixed
- __toString() : string
- addBlock() : $this
- addFramework() : $this
- addHtml() : bool
- addInlineModule() : bool
- Shortcut for writing addInlineScript(['type' => 'module', 'content' => ...]).
- addInlineScript() : bool
- addInlineStyle() : bool
- addLink() : bool
- addModule() : bool
- Shortcut for writing addScript(['type' => 'module', 'src' => ...]).
- addScript() : bool
- addStyle() : bool
- build() : void
- create() : static
- fromArray() : ContentBlockInterface
- getAssets() : array<string|int, mixed>
- getChecksum() : string
- getFrameworks() : array<string|int, mixed>
- getHtml() : array<string|int, mixed>
- getId() : string
- getLinks() : array<string|int, mixed>
- getScripts() : array<string|int, mixed>
- getStyles() : array<string|int, mixed>
- getToken() : string
- setChecksum() : $this
- setContent() : $this
- toArray() : array<string|int, mixed>
- toString() : string
Methods
__construct()
public
__construct([string|null $id = null ]) : mixed
Parameters
- $id : string|null = null
__toString()
public
__toString() : string
Return values
stringaddBlock()
public
addBlock(ContentBlockInterface $block) : $this
Parameters
- $block : ContentBlockInterface
Return values
$thisaddFramework()
public
addFramework(string $framework) : $this
Parameters
- $framework : string
Return values
$thisaddHtml()
public
addHtml(string $html[, int $priority = 0 ][, string $location = 'bottom' ]) : bool
Parameters
- $html : string
- $priority : int = 0
- $location : string = 'bottom'
Return values
booladdInlineModule()
Shortcut for writing addInlineScript(['type' => 'module', 'content' => ...]).
public
addInlineModule(string|array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : string|array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Return values
booladdInlineScript()
public
addInlineScript(string|array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : string|array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Return values
booladdInlineStyle()
public
addInlineStyle(string|array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : string|array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Return values
booladdLink()
public
addLink(array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Return values
booladdModule()
Shortcut for writing addScript(['type' => 'module', 'src' => ...]).
public
addModule(string|array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : string|array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Return values
booladdScript()
public
addScript(string|array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : string|array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Return values
booladdStyle()
public
addStyle(string|array<string|int, mixed> $element[, int $priority = 0 ][, string $location = 'head' ]) : bool
Parameters
- $element : string|array<string|int, mixed>
- $priority : int = 0
- $location : string = 'head'
Tags
Return values
boolbuild()
public
build(array<string|int, mixed> $serialized) : void
Parameters
- $serialized : array<string|int, mixed>
create()
public
static create([string|null $id = null ]) : static
Parameters
- $id : string|null = null
Return values
staticfromArray()
public
static fromArray(array<string|int, mixed> $serialized) : ContentBlockInterface
Parameters
- $serialized : array<string|int, mixed>
Return values
ContentBlockInterfacegetAssets()
public
getAssets() : array<string|int, mixed>
Return values
array<string|int, mixed>getChecksum()
public
getChecksum() : string
Return values
stringgetFrameworks()
public
getFrameworks() : array<string|int, mixed>
Return values
array<string|int, mixed>getHtml()
public
getHtml([string $location = 'bottom' ]) : array<string|int, mixed>
Parameters
- $location : string = 'bottom'
Return values
array<string|int, mixed>getId()
public
getId() : string
Return values
stringgetLinks()
public
getLinks([string $location = 'head' ]) : array<string|int, mixed>
Parameters
- $location : string = 'head'
Return values
array<string|int, mixed>getScripts()
public
getScripts([string $location = 'head' ]) : array<string|int, mixed>
Parameters
- $location : string = 'head'
Return values
array<string|int, mixed>getStyles()
public
getStyles([string $location = 'head' ]) : array<string|int, mixed>
Parameters
- $location : string = 'head'
Return values
array<string|int, mixed>getToken()
public
getToken() : string
Return values
stringsetChecksum()
public
setChecksum(string $checksum) : $this
Parameters
- $checksum : string
Return values
$thissetContent()
public
setContent(string $content) : $this
Parameters
- $content : string
Return values
$thistoArray()
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>toString()
public
toString() : string