PHP Trait Bolt\Extension\AssetTrait

Author: Gawain Lynch ([email protected])
Show file Open project: bolt/bolt

Protected Methods

Method Description
addJquery ( ) Add jQuery to the output.
disableJquery ( ) Don't add jQuery to the output.
extendAssetServices ( ) Call this in register method.
getBaseDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
getContainer ( ) : Pimple
getName ( ) : string
getWebDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
registerAssets ( ) : Bolt\Asset\AssetInterface[] Returns a list of assets to register. Assets can be a file, snippet, or widget.

Private Methods

Method Description
addAsset ( Bolt\Asset\AssetInterface $asset ) Add an file, snippet or widget asset to the render queue.
isAbsoluteUrl ( string $url ) : boolean
loadAssets ( ) Merges assets returned from registerAssets() to our list.
normalizeAsset ( Bolt\Asset\File\FileAssetInterface $asset ) Normalizes the path and package name of the asset file.

Method Details

addJquery() protected method

Add jQuery to the output.
Deprecation: Deprecated since 3.0, to be removed in 4.0.
protected addJquery ( )

disableJquery() protected method

Don't add jQuery to the output.
Deprecation: Deprecated since 3.0, to be removed in 4.0.
protected disableJquery ( )

extendAssetServices() final protected method

Call this in register method.
final protected extendAssetServices ( )

getBaseDirectory() abstract protected method

abstract protected getBaseDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
return Bolt\Filesystem\Handler\DirectoryInterface

getContainer() abstract protected method

abstract protected getContainer ( ) : Pimple
return Pimple

getName() abstract protected method

abstract protected getName ( ) : string
return string

getWebDirectory() abstract protected method

abstract protected getWebDirectory ( ) : Bolt\Filesystem\Handler\DirectoryInterface
return Bolt\Filesystem\Handler\DirectoryInterface

registerAssets() protected method

Returns a list of assets to register. Assets can be a file, snippet, or widget.
protected registerAssets ( ) : Bolt\Asset\AssetInterface[]
return Bolt\Asset\AssetInterface[]