Assets
in package
Tags
Table of Contents
- $mediaScripts : array<string|int, string>
- $scripts : array<string|int, mixed>
- $styles : array<string|int, mixed>
- __construct() : mixed
- addCssDependency() : mixed
- addJsDependency() : mixed
- enqueueBundle() : self
- enqueueMedia() : self
- enqueueScript() : self
- enqueueStyle() : self
- enqueueTranslations() : self
- getDependentScripts() : mixed
- getDependentStyles() : mixed
- initAssets() : mixed
- registerAssets() : mixed
- registerScript() : self
- registerStyle() : self
- addActions() : mixed
- addDependencyTo() : mixed
- addFlatpickrLocalization() : mixed
- getDependentsOf() : mixed
- initLocalizations() : mixed
Properties
$mediaScripts
protected
array<string|int, string>
$mediaScripts
= []
Tags
$scripts
protected
array<string|int, mixed>
$scripts
= []
Tags
$styles
protected
array<string|int, mixed>
$styles
= []
Tags
Methods
__construct()
public
__construct() : mixed
Tags
Return values
mixed —addCssDependency()
public
addCssDependency(string $handle, string|callable $dependency) : mixed
Parameters
- $handle : string
- $dependency : string|callable
-
New dependency or callback to filter dependencies.
Tags
Return values
mixed —addJsDependency()
public
addJsDependency(string $handle, string|callable $dependency) : mixed
Parameters
- $handle : string
- $dependency : string|callable
-
New dependency or callback to filter dependencies.
Tags
Return values
mixed —enqueueBundle()
public
enqueueBundle(array<string|int, string> ...$handles) : self
Parameters
- $handles : array<string|int, string>
Tags
Return values
self —enqueueMedia()
public
enqueueMedia(array<string|int, string> ...$handles) : self
Parameters
- $handles : array<string|int, string>
Tags
Return values
self —enqueueScript()
public
enqueueScript(array<string|int, string> ...$handles) : self
Parameters
- $handles : array<string|int, string>
Tags
Return values
self —enqueueStyle()
public
enqueueStyle(array<string|int, string> ...$handles) : self
Parameters
- $handles : array<string|int, string>
Tags
Return values
self —enqueueTranslations()
public
enqueueTranslations(array<string|int, string> ...$handles) : self
Parameters
- $handles : array<string|int, string>
Tags
Return values
self —getDependentScripts()
public
getDependentScripts(string $dependency) : mixed
Parameters
- $dependency : string
Tags
Return values
mixed —getDependentStyles()
public
getDependentStyles(string $dependency) : mixed
Parameters
- $dependency : string
Tags
Return values
mixed —initAssets()
public
initAssets() : mixed
Tags
Return values
mixed —registerAssets()
public
registerAssets() : mixed
Tags
Return values
mixed —registerScript()
public
registerScript(string $handle, string $file[, array<string|int, mixed> $dependencies = [] ][, string $version = '' ][, bool $inFooter = true ]) : self
Parameters
- $handle : string
- $file : string
-
Absolute path to the file.
- $dependencies : array<string|int, mixed> = []
-
Optional.
- $version : string = ''
-
Optional. Current version of the plugin by default.
- $inFooter : bool = true
-
Optional. True by default.
Tags
Return values
self —registerStyle()
public
registerStyle(string $handle, string $file[, array<string|int, mixed> $dependencies = [] ][, string $version = '' ][, string $media = 'all' ]) : self
Parameters
- $handle : string
- $file : string
-
Absolute path to the file.
- $dependencies : array<string|int, mixed> = []
-
Optional.
- $version : string = ''
-
Optional. Current version of the plugin by default.
- $media : string = 'all'
-
Optional. 'all' by default.
Tags
Return values
self —addActions()
protected
addActions() : mixed
Tags
Return values
mixed —addDependencyTo()
protected
addDependencyTo(array<string|int, mixed> &$assets, string $handle, string|callable $dependency) : mixed
Parameters
- $assets : array<string|int, mixed>
- $handle : string
- $dependency : string|callable
Tags
Return values
mixed —addFlatpickrLocalization()
protected
addFlatpickrLocalization(string $language) : mixed
Parameters
- $language : string
Tags
Return values
mixed —getDependentsOf()
protected
getDependentsOf(array<string|int, mixed> &$assets, string $dependency) : mixed
Parameters
- $assets : array<string|int, mixed>
- $dependency : string
Tags
Return values
mixed —initLocalizations()
protected
initLocalizations() : mixed