Documentation

Assets extends PropertyObject
in package
uses TestingAssetsTrait, LegacyAssetsTrait

Class Assets

Table of Contents

Constants

CSS  = 'css'
CSS_COLLECTION  = 'assets_css'
CSS_REGEX  = '/.\.css$/i'
CSS_TYPE  = \Grav\Common\Assets\Css::class
DEFAULT_REGEX  = '/.\.(css|js)$/i'
INLINE_CSS_TYPE  = \Grav\Common\Assets\InlineCss::class
INLINE_JS_MODULE_TYPE  = \Grav\Common\Assets\InlineJsModule::class
INLINE_JS_TYPE  = \Grav\Common\Assets\InlineJs::class
JS  = 'js'
JS_COLLECTION  = 'assets_js'
JS_MODULE  = 'js_module'
JS_MODULE_COLLECTION  = 'assets_js_module'
JS_MODULE_REGEX  = '/.\.mjs$/i'
JS_MODULE_TYPE  = \Grav\Common\Assets\JsModule::class
JS_REGEX  = '/.\.js$/i'
JS_TYPE  = \Grav\Common\Assets\Js::class
LINK  = 'link'
LINK_COLLECTION  = 'assets_link'
LINK_TYPE  = \Grav\Common\Assets\Link::class

Properties

$assets_css  : array<string|int, mixed>
$assets_dir  : string
$assets_js  : array<string|int, mixed>
$assets_js_module  : array<string|int, mixed>
$assets_link  : array<string|int, mixed>
$assets_url  : string
$autoload  : string
$collections  : array<string|int, mixed>|null
$css_pipeline  : bool
$css_pipeline_before_excludes  : bool
$css_pipeline_include_externals  : bool
$enable_asset_timestamp  : bool
$fetch_command  : Closure|string
$js_module_pipeline  : bool
$js_module_pipeline_before_excludes  : bool
$js_module_pipeline_include_externals  : bool
$js_pipeline  : bool
$js_pipeline_before_excludes  : bool
$js_pipeline_include_externals  : bool
$order  : array<string|int, mixed>
$pipeline_options  : array<string|int, mixed>
$timestamp  : string
$type  : string
$_definedProperties  : array<string|int, mixed>
$_key  : string

Methods

__construct()  : mixed
__get()  : mixed
Returns the value at specified offset.
__isset()  : bool
Checks whether or not an offset exists.
__serialize()  : array<string|int, mixed>
__set()  : void
Assigns a value to the specified offset.
__toString()  : string
Returns a string representation of this object.
__unserialize()  : void
__unset()  : void
Magic method to unset the attribute
add()  : $this
Add an asset or a collection of assets.
addAsyncJs()  : Assets
Convenience wrapper for async loading of JavaScript
addCss()  : $this
Add a CSS asset or a collection of assets.
addDeferJs()  : Assets
Convenience wrapper for deferred loading of JavaScript
addDir()  : $this
Add all assets matching $pattern within $directory.
addDirCss()  : $this
Add all CSS assets within $directory
addDirJs()  : $this
Add all JavaScript assets within $directory
addInlineCss()  : $this
Add an Inline CSS asset or a collection of assets.
addInlineJs()  : $this
Add an Inline JS asset or a collection of assets.
addInlineJsModule()  : $this
Add an Inline JS asset or a collection of assets.
addJs()  : $this
Add a JS asset or a collection of assets.
addJsModule()  : $this
Add a JS asset or a collection of assets.
addLink()  : $this
Add a CSS asset or a collection of assets.
all()  : string
config()  : $this
Set up configuration options.
css()  : string
Build the CSS link tags.
defNestedProperty()  : $this
defProperty()  : $this
exists()  : bool
Determines if an asset exists as a collection, CSS or JS reference
getCollections()  : array<string|int, mixed>
Return the array of all the registered collections
getCss()  : array<string|int, mixed>
Return the array of all the registered CSS assets If a $key is provided, it will try to return only that asset else it will return null
getJs()  : array<string|int, mixed>
Return the array of all the registered JS assets If a $key is provided, it will try to return only that asset else it will return null
getKey()  : string
getNestedProperty()  : mixed
getProperty()  : mixed
getTimestamp()  : string|null
Get the timestamp for assets
getType()  : string
hasKey()  : bool
hasNestedProperty()  : bool
hasProperty()  : bool
init()  : void
Initialization called in the Grav lifecycle to initialize the Assets with appropriate configuration
js()  : string
Build the JavaScript script tags.
jsModule()  : string
Build the Javascript Modules tags
jsonSerialize()  : array<string|int, mixed>
Implements JsonSerializable interface.
link()  : string
Build the CSS link tags.
offsetExists()  : bool
Whether or not an offset exists.
offsetGet()  : mixed
Returns the value at specified offset.
offsetSet()  : void
Assigns a value to the specified offset.
offsetUnset()  : void
Unsets an offset.
registerCollection()  : $this
Add/replace collection.
removeCss()  : $this
Removes an item from the CSS array if set
removeJs()  : $this
Removes an item from the JS array if set
render()  : string
reset()  : $this
Reset all assets.
resetCss()  : $this
Reset CSS assets.
resetJs()  : $this
Reset JavaScript assets.
setCollection()  : $this
Set the array of collections explicitly
setCss()  : $this
Set the whole array of CSS assets
setCssPipeline()  : $this
Sets the state of CSS Pipeline
setJs()  : $this
Set the whole array of JS assets
setJsPipeline()  : $this
Sets the state of JS Pipeline
setNestedProperty()  : $this
setProperty()  : $this
setTimestamp()  : mixed
Explicitly set's a timestamp for assets
unsetNestedProperty()  : $this
unsetProperty()  : $this
addType()  : $this
createArgumentsFromLegacy()  : array<string|int, mixed>
doGetProperty()  : mixed
doHasProperty()  : bool
doSerialize()  : array<string|int, mixed>
doSetProperty()  : void
doUnserialize()  : void
doUnsetProperty()  : void
filterAssets()  : array<string|int, mixed>|false
getBaseType()  : string
getElement()  : mixed|null
getElements()  : array<string|int, mixed>
getTypePrefix()  : string
initObjectProperties()  : void
isPropertyLoaded()  : bool
isValidType()  : bool
offsetLoad()  : mixed
offsetPrepare()  : mixed
offsetSerialize()  : mixed
rglob()  : array<string|int, mixed>
Recursively get files matching $pattern within $directory.
setElements()  : void
setKey()  : $this
sortAssets()  : array<string|int, mixed>
unifyLegacyArguments()  : array<string|int, mixed>

Constants

CSS_COLLECTION

public mixed CSS_COLLECTION = 'assets_css'

CSS_REGEX

public mixed CSS_REGEX = '/.\.css$/i'
Tags
const

Regex to match CSS files

CSS_TYPE

public mixed CSS_TYPE = \Grav\Common\Assets\Css::class

DEFAULT_REGEX

public mixed DEFAULT_REGEX = '/.\.(css|js)$/i'
Tags
const

Regex to match CSS and JavaScript files

INLINE_CSS_TYPE

public mixed INLINE_CSS_TYPE = \Grav\Common\Assets\InlineCss::class

INLINE_JS_MODULE_TYPE

public mixed INLINE_JS_MODULE_TYPE = \Grav\Common\Assets\InlineJsModule::class

INLINE_JS_TYPE

public mixed INLINE_JS_TYPE = \Grav\Common\Assets\InlineJs::class

JS_COLLECTION

public mixed JS_COLLECTION = 'assets_js'

JS_MODULE

public mixed JS_MODULE = 'js_module'

JS_MODULE_COLLECTION

public mixed JS_MODULE_COLLECTION = 'assets_js_module'

JS_MODULE_REGEX

public mixed JS_MODULE_REGEX = '/.\.mjs$/i'
Tags
const

Regex to match JavaScriptModyle files

JS_MODULE_TYPE

public mixed JS_MODULE_TYPE = \Grav\Common\Assets\JsModule::class

JS_REGEX

public mixed JS_REGEX = '/.\.js$/i'
Tags
const

Regex to match JavaScript files

JS_TYPE

public mixed JS_TYPE = \Grav\Common\Assets\Js::class
public mixed LINK_COLLECTION = 'assets_link'
public mixed LINK_TYPE = \Grav\Common\Assets\Link::class

Properties

$assets_css

protected array<string|int, mixed> $assets_css = []

$assets_dir

protected string $assets_dir

$assets_js

protected array<string|int, mixed> $assets_js = []

$assets_js_module

protected array<string|int, mixed> $assets_js_module = []
protected array<string|int, mixed> $assets_link = []

$assets_url

protected string $assets_url

$autoload

protected string $autoload

$collections

protected array<string|int, mixed>|null $collections

$css_pipeline

protected bool $css_pipeline

$css_pipeline_before_excludes

protected bool $css_pipeline_before_excludes

$css_pipeline_include_externals

protected bool $css_pipeline_include_externals

$enable_asset_timestamp

protected bool $enable_asset_timestamp

$fetch_command

protected Closure|string $fetch_command

$js_module_pipeline

protected bool $js_module_pipeline

$js_module_pipeline_before_excludes

protected bool $js_module_pipeline_before_excludes

$js_module_pipeline_include_externals

protected bool $js_module_pipeline_include_externals

$js_pipeline

protected bool $js_pipeline

$js_pipeline_before_excludes

protected bool $js_pipeline_before_excludes

$js_pipeline_include_externals

protected bool $js_pipeline_include_externals

$order

protected array<string|int, mixed> $order = []

Keeping track for order counts (for sorting)

$pipeline_options

protected array<string|int, mixed> $pipeline_options = []

$timestamp

protected string $timestamp

Methods

__construct()

public __construct([array<string|int, mixed> $elements = [] ][, string|null $key = null ]) : mixed
Parameters
$elements : array<string|int, mixed> = []
$key : string|null = null
Tags
throws
InvalidArgumentException

__get()

Returns the value at specified offset.

public __get(mixed $offset) : mixed
Parameters
$offset : mixed

The offset to retrieve.

Attributes
#[ReturnTypeWillChange]
Return values
mixed

Can return all value types.

__isset()

Checks whether or not an offset exists.

public __isset(mixed $offset) : bool
Parameters
$offset : mixed

An offset to check for.

Attributes
#[ReturnTypeWillChange]
Return values
bool

Returns TRUE on success or FALSE on failure.

__serialize()

public final __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__set()

Assigns a value to the specified offset.

public __set(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

The offset to assign the value to.

$value : mixed

The value to set.

Attributes
#[ReturnTypeWillChange]

__toString()

Returns a string representation of this object.

public __toString() : string
Attributes
#[ReturnTypeWillChange]
Return values
string

__unserialize()

public final __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

__unset()

Magic method to unset the attribute

public __unset(mixed $offset) : void
Parameters
$offset : mixed

The name value to unset

Attributes
#[ReturnTypeWillChange]

add()

Add an asset or a collection of assets.

public add(string|array<string|int, string> $asset) : $this

It automatically detects the asset type (JavaScript, CSS or collection). You may add more than one asset passing an array as argument.

Parameters
$asset : string|array<string|int, string>
Return values
$this

addAsyncJs()

Convenience wrapper for async loading of JavaScript

public addAsyncJs(string|array<string|int, mixed> $asset[, int $priority = 10 ][, bool $pipeline = true ][, string $group = 'head' ]) : Assets

Please use dynamic method with ['loading' => 'async'].

Parameters
$asset : string|array<string|int, mixed>
$priority : int = 10
$pipeline : bool = true
$group : string = 'head'

name of the group

Return values
Assets

addCss()

Add a CSS asset or a collection of assets.

public addCss(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

addDeferJs()

Convenience wrapper for deferred loading of JavaScript

public addDeferJs(string|array<string|int, mixed> $asset[, int $priority = 10 ][, bool $pipeline = true ][, string $group = 'head' ]) : Assets

Please use dynamic method with ['loading' => 'defer'].

Parameters
$asset : string|array<string|int, mixed>
$priority : int = 10
$pipeline : bool = true
$group : string = 'head'

name of the group

Return values
Assets

addDir()

Add all assets matching $pattern within $directory.

public addDir(string $directory[, string $pattern = self::DEFAULT_REGEX ]) : $this
Parameters
$directory : string

Relative to the Grav root path, or a stream identifier

$pattern : string = self::DEFAULT_REGEX

(regex)

Return values
$this

addDirCss()

Add all CSS assets within $directory

public addDirCss(string $directory) : $this
Parameters
$directory : string

Relative to the Grav root path, or a stream identifier

Return values
$this

addDirJs()

Add all JavaScript assets within $directory

public addDirJs(string $directory) : $this
Parameters
$directory : string

Relative to the Grav root path, or a stream identifier

Return values
$this

addInlineCss()

Add an Inline CSS asset or a collection of assets.

public addInlineCss(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

addInlineJs()

Add an Inline JS asset or a collection of assets.

public addInlineJs(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

addInlineJsModule()

Add an Inline JS asset or a collection of assets.

public addInlineJsModule(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

addJs()

Add a JS asset or a collection of assets.

public addJs(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

addJsModule()

Add a JS asset or a collection of assets.

public addJsModule(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

Add a CSS asset or a collection of assets.

public addLink(mixed $asset) : $this
Parameters
$asset : mixed
Return values
$this

all()

public all([string $group = 'head' ][, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$group : string = 'head'
$attributes : array<string|int, mixed> = []
Return values
string

config()

Set up configuration options.

public config(array<string|int, mixed> $config) : $this

All the class properties except 'js' and 'css' are accepted here. Also, an extra option 'autoload' may be passed containing an array of assets and/or collections that will be automatically added on startup.

Parameters
$config : array<string|int, mixed>

Configurable options.

Return values
$this

css()

Build the CSS link tags.

public css([string $group = 'head' ][, array<string|int, mixed> $attributes = [] ][, mixed $include_link = true ]) : string
Parameters
$group : string = 'head'

name of the group

$attributes : array<string|int, mixed> = []
$include_link : mixed = true
Return values
string

defNestedProperty()

public defNestedProperty(string $property, mixed $default[, string|null $separator = null ]) : $this
Parameters
$property : string

Object property to be updated.

$default : mixed

Default value.

$separator : string|null = null

Separator, defaults to '.'

Tags
throws
RuntimeException
Return values
$this

defProperty()

public defProperty(string $property, mixed $default) : $this
Parameters
$property : string

Object property to be defined.

$default : mixed

Default value.

Return values
$this

exists()

Determines if an asset exists as a collection, CSS or JS reference

public exists(string $asset) : bool
Parameters
$asset : string
Return values
bool

getCollections()

Return the array of all the registered collections

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

getCss()

Return the array of all the registered CSS assets If a $key is provided, it will try to return only that asset else it will return null

public getCss([string|null $key = null ]) : array<string|int, mixed>
Parameters
$key : string|null = null

the asset key

Return values
array<string|int, mixed>

getJs()

Return the array of all the registered JS assets If a $key is provided, it will try to return only that asset else it will return null

public getJs([string|null $key = null ]) : array<string|int, mixed>
Parameters
$key : string|null = null

the asset key

Return values
array<string|int, mixed>

getKey()

public getKey() : string
Return values
string

getNestedProperty()

public getNestedProperty(string $property[, mixed|null $default = null ][, string|null $separator = null ]) : mixed
Parameters
$property : string

Object property to be fetched.

$default : mixed|null = null

Default value if property has not been set.

$separator : string|null = null

Separator, defaults to '.'

Return values
mixed

Property value.

getProperty()

public getProperty(string $property[, mixed $default = null ]) : mixed
Parameters
$property : string

Object property to be fetched.

$default : mixed = null

Default value if property has not been set.

Return values
mixed

Property value.

getTimestamp()

Get the timestamp for assets

public getTimestamp([bool $include_join = true ]) : string|null
Parameters
$include_join : bool = true
Return values
string|null

getType()

public getType([bool $prefix = true ]) : string
Parameters
$prefix : bool = true
Return values
string

hasNestedProperty()

public hasNestedProperty(string $property[, string|null $separator = null ]) : bool
Parameters
$property : string

Object property name.

$separator : string|null = null

Separator, defaults to '.'

Return values
bool

True if property has been defined (can be null).

hasProperty()

public hasProperty(string $property) : bool
Parameters
$property : string

Object property name.

Return values
bool

True if property has been defined (can be null).

init()

Initialization called in the Grav lifecycle to initialize the Assets with appropriate configuration

public init() : void

js()

Build the JavaScript script tags.

public js([string $group = 'head' ][, array<string|int, mixed> $attributes = [] ][, mixed $include_js_module = true ]) : string
Parameters
$group : string = 'head'

name of the group

$attributes : array<string|int, mixed> = []
$include_js_module : mixed = true
Return values
string

jsModule()

Build the Javascript Modules tags

public jsModule([string $group = 'head' ][, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$group : string = 'head'
$attributes : array<string|int, mixed> = []
Return values
string

jsonSerialize()

Implements JsonSerializable interface.

public jsonSerialize() : array<string|int, mixed>
Attributes
#[ReturnTypeWillChange]
Return values
array<string|int, mixed>

Build the CSS link tags.

public link([string $group = 'head' ][, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$group : string = 'head'

name of the group

$attributes : array<string|int, mixed> = []
Return values
string

offsetExists()

Whether or not an offset exists.

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed

An offset to check for.

Attributes
#[ReturnTypeWillChange]
Return values
bool

Returns TRUE on success or FALSE on failure.

offsetGet()

Returns the value at specified offset.

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed

The offset to retrieve.

Attributes
#[ReturnTypeWillChange]
Return values
mixed

Can return all value types.

offsetSet()

Assigns a value to the specified offset.

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

The offset to assign the value to.

$value : mixed

The value to set.

Attributes
#[ReturnTypeWillChange]

offsetUnset()

Unsets an offset.

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

The offset to unset.

Attributes
#[ReturnTypeWillChange]

registerCollection()

Add/replace collection.

public registerCollection(string $collectionName, array<string|int, mixed> $assets[, bool $overwrite = false ]) : $this
Parameters
$collectionName : string
$assets : array<string|int, mixed>
$overwrite : bool = false
Return values
$this

removeCss()

Removes an item from the CSS array if set

public removeCss(string $key) : $this
Parameters
$key : string

The asset key

Return values
$this

removeJs()

Removes an item from the JS array if set

public removeJs(string $key) : $this
Parameters
$key : string

The asset key

Return values
$this

render()

public render(string $type[, string $group = 'head' ][, array<string|int, mixed> $attributes = [] ]) : string
Parameters
$type : string
$group : string = 'head'
$attributes : array<string|int, mixed> = []
Return values
string

resetJs()

Reset JavaScript assets.

public resetJs() : $this
Return values
$this

setCollection()

Set the array of collections explicitly

public setCollection(array<string|int, mixed> $collections) : $this
Parameters
$collections : array<string|int, mixed>
Return values
$this

setCss()

Set the whole array of CSS assets

public setCss(array<string|int, mixed> $css) : $this
Parameters
$css : array<string|int, mixed>
Return values
$this

setCssPipeline()

Sets the state of CSS Pipeline

public setCssPipeline(bool $value) : $this
Parameters
$value : bool
Return values
$this

setJs()

Set the whole array of JS assets

public setJs(array<string|int, mixed> $js) : $this
Parameters
$js : array<string|int, mixed>
Return values
$this

setJsPipeline()

Sets the state of JS Pipeline

public setJsPipeline(bool $value) : $this
Parameters
$value : bool
Return values
$this

setNestedProperty()

public setNestedProperty(string $property, mixed $value[, string|null $separator = null ]) : $this
Parameters
$property : string

Object property to be updated.

$value : mixed

New value.

$separator : string|null = null

Separator, defaults to '.'

Tags
throws
RuntimeException
Return values
$this

setProperty()

public setProperty(string $property, mixed $value) : $this
Parameters
$property : string

Object property to be updated.

$value : mixed

New value.

Return values
$this

setTimestamp()

Explicitly set's a timestamp for assets

public setTimestamp(string|int $value) : mixed
Parameters
$value : string|int

unsetNestedProperty()

public unsetNestedProperty(string $property[, string|null $separator = null ]) : $this
Parameters
$property : string

Object property to be updated.

$separator : string|null = null

Separator, defaults to '.'

Tags
throws
RuntimeException
Return values
$this

unsetProperty()

public unsetProperty(string $property) : $this
Parameters
$property : string

Object property to be unset.

Return values
$this

addType()

protected addType(string $collection, string $type, string|array<string|int, string> $asset, array<string|int, mixed> $options) : $this
Parameters
$collection : string
$type : string
$asset : string|array<string|int, string>
$options : array<string|int, mixed>
Return values
$this

createArgumentsFromLegacy()

protected createArgumentsFromLegacy(array<string|int, mixed> $args, array<string|int, mixed> $defaults) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>
$defaults : array<string|int, mixed>
Return values
array<string|int, mixed>

doGetProperty()

protected & doGetProperty(string $property[, mixed $default = null ][, callable|bool $doCreate = false ]) : mixed
Parameters
$property : string

Object property to be fetched.

$default : mixed = null

Default value if property has not been set.

$doCreate : callable|bool = false

Set true to create variable.

Return values
mixed

Property value.

doHasProperty()

protected doHasProperty(string $property) : bool
Parameters
$property : string

Object property name.

Return values
bool

True if property has been defined (can be null).

doSerialize()

protected doSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

doSetProperty()

protected doSetProperty(string $property, mixed $value) : void
Parameters
$property : string

Object property to be updated.

$value : mixed

New value.

Tags
throws
InvalidArgumentException

doUnserialize()

protected doUnserialize(array<string|int, mixed> $serialized) : void
Parameters
$serialized : array<string|int, mixed>

doUnsetProperty()

protected doUnsetProperty(string $property) : void
Parameters
$property : string

Object property to be unset.

filterAssets()

protected filterAssets(array<string|int, mixed> $assets, string $key, string $value[, bool $sort = false ]) : array<string|int, mixed>|false
Parameters
$assets : array<string|int, mixed>
$key : string
$value : string
$sort : bool = false
Return values
array<string|int, mixed>|false

getBaseType()

protected getBaseType(class-string $type) : string
Parameters
$type : class-string
Return values
string

getElement()

protected getElement(string $property[, mixed|null $default = null ]) : mixed|null
Parameters
$property : string
$default : mixed|null = null
Return values
mixed|null

getElements()

protected getElements() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTypePrefix()

protected getTypePrefix() : string
Return values
string

isPropertyLoaded()

protected isPropertyLoaded(string $property) : bool
Parameters
$property : string

Object property name.

Return values
bool

True if property has been loaded.

isValidType()

protected isValidType(class-string $type) : bool
Parameters
$type : class-string
Return values
bool

offsetLoad()

protected offsetLoad(string $offset, mixed $value) : mixed
Parameters
$offset : string
$value : mixed

offsetPrepare()

protected offsetPrepare(string $offset, mixed $value) : mixed
Parameters
$offset : string
$value : mixed

offsetSerialize()

protected offsetSerialize(string $offset, mixed $value) : mixed
Parameters
$offset : string
$value : mixed

rglob()

Recursively get files matching $pattern within $directory.

protected rglob(string $directory, string $pattern[, string|null $ltrim = null ]) : array<string|int, mixed>
Parameters
$directory : string
$pattern : string

(regex)

$ltrim : string|null = null

Will be trimmed from the left of the file path

Return values
array<string|int, mixed>

setElements()

protected setElements(array<string|int, mixed> $elements) : void
Parameters
$elements : array<string|int, mixed>

setKey()

protected setKey(string $key) : $this
Parameters
$key : string
Return values
$this

sortAssets()

protected sortAssets(array<string|int, mixed> $assets) : array<string|int, mixed>
Parameters
$assets : array<string|int, mixed>
Return values
array<string|int, mixed>

unifyLegacyArguments()

protected unifyLegacyArguments(array<string|int, mixed> $args[, string $type = Assets::CSS_TYPE ]) : array<string|int, mixed>
Parameters
$args : array<string|int, mixed>
$type : string = Assets::CSS_TYPE
Return values
array<string|int, mixed>

        
On this page

Search results