KeepaliveAssetItem
class KeepaliveAssetItem extends WebAssetItem implements WebAssetAttachBehaviorInterface
Web Asset Item class for Keepalive asset
Properties
protected string
Since: 4.0.0
|
$name | Asset name |
from WebAssetItem |
protected string
Since: 4.0.0
|
$uri | The URI for the asset |
from WebAssetItem |
protected array
Since: 4.0.0
|
$options | Additional options for the asset |
from WebAssetItem |
protected array
Since: 4.0.0
|
$attributes | Attributes for the asset, to be rendered in the asset's HTML tag |
from WebAssetItem |
protected string[]
Since: 4.0.0
|
$dependencies | Asset dependencies |
from WebAssetItem |
protected string
Since: 4.0.0
|
$version | Asset version |
from WebAssetItem |
Methods
__construct(string $name, string|null $uri = null, array $options = [], array $attributes = [], array $dependencies = [])
Class constructor
from
WebAssetItem
setAttribute(string $key, string $value = null)
Set the attribute
from
WebAssetItem
bool
isPathAbsolute(string $path)
Check if the Path is relative to /media folder or absolute
from
WebAssetItem
void
Details
__construct(string $name, string|null $uri = null, array $options = [], array $attributes = [], array $dependencies = [])
Since: 4.0.0
Class constructor
WebAssetItemInterface
setAttribute(string $key, string $value = null)
Since: 4.0.0
Set the attribute
protected bool
isPathAbsolute(string $path)
Since: 4.0.0
Check if the Path is relative to /media folder or absolute
void
onAttachCallback(Document $doc)
Since: 4.0.0
Method called when asset attached to the Document.
Useful for Asset to add a Script options.