com\setasign\SetaFramework\View\Helper
HtmlHead Class HtmlHead
File: /SetaFramework/src/View/Helper/HtmlHead.php
ViewHelper to add & set head data
Class hierarchy
Implements
Summary
Properties
$javascript
private array<array{path: string, attributes: array<string|int, null|string>}> HtmlHead::$javascript = array()
Variable for paths to JavaScripts
Methods
__toString()
Overrides the __toString method Returns all set information as HTML tags in their special appearance for each type
addJs()
Adds a JavaScript path
Parameters
- $path : string
- $attributes : array<string, string>
Exceptions
Throws \InvalidArgumentException
hasJs()
Parameters
- $path : string
- $attributes : array<string, string>
Exceptions
Throws \InvalidArgumentException
prependCss()
public HtmlHead::prependCss (
string $path,
?string $media = null,
array<string, string> $attributes = array ( ),
?string $beforePath = null
): self?string $media = null,
array<string, string> $attributes = array ( ),
?string $beforePath = null
Prepends a path of a CSS file before an other If the path to prepend before doesn't exist an exception is thrown
Parameters
- $path : string
- $media : ?string
- $attributes : array<string, string>
- $beforePath : ?string
Exceptions
Throws \InvalidArgumentException
prependJs()
public HtmlHead::prependJs (
string $path,
?string $beforePath = null,
array<string, string> $attributes = array ( )
): self?string $beforePath = null,
array<string, string> $attributes = array ( )
Prepends a JavaScript path before an other.
If the path is already registered
Parameters
- $path : string
- $beforePath : ?string
- $attributes : array<string, string>
Exceptions
Throws \InvalidArgumentException If the path to prepend before doesn't exist
