AttachedAssets
class AttachedAssets implements AttachedAssetsInterface (View source)
The default attached assets collection.
Properties
| string[] | $libraries | The (ordered) list of asset libraries attached to the current response. |
|
| array | $settings | The JavaScript settings attached to the current response. |
|
| protected string[] | $alreadyLoadedLibraries | The set of asset libraries that the client has already loaded. |
Methods
Creates an AttachedAssetsInterface object from a render array.
Sets the asset libraries attached to the current response.
Returns the asset libraries attached to the current response.
Sets the JavaScript settings that are attached to the current response.
Returns the settings attached to the current response.
Returns the set of already loaded asset libraries.
Sets the asset libraries that the current request marked as already loaded.
Details
static AttachedAssetsInterface
createFromRenderArray(array $render_array)
Creates an AttachedAssetsInterface object from a render array.
$this
setLibraries(array $libraries)
Sets the asset libraries attached to the current response.
string[]
getLibraries()
Returns the asset libraries attached to the current response.
$this
setSettings(array $settings)
Sets the JavaScript settings that are attached to the current response.
array
getSettings()
Returns the settings attached to the current response.
string[]
getAlreadyLoadedLibraries()
Returns the set of already loaded asset libraries.
$this
setAlreadyLoadedLibraries(array $libraries)
Sets the asset libraries that the current request marked as already loaded.