interface AssetManagerInterface

Methods

container(string $name = 'default')

Get container, if it doesn't exist create it

$this
addContainer(AssetContainer $container)

Add container to manager

getContainers()

Get all containers

addCss(string $name, string $source, array $dependencies = array(), array $attributes = array())

Add a CSS file to the registered assets.

addJs(string $name, string $source, array $dependencies = array(), array $attributes = array())

Add a JavaScript file to the registered assets.

string
outputJs(string $container = 'default')

Output a JS asset from the container

string
outputCss(string $container = 'default')

Output a CSS asset from the container

Details

at line 22
AssetContainer container(string $name = 'default')

Get container, if it doesn't exist create it

Parameters

string $name

Return Value

AssetContainer

at line 30
$this addContainer(AssetContainer $container)

Add container to manager

Parameters

AssetContainer $container

Return Value

$this

at line 37
AssetContainer[] getContainers()

Get all containers

Return Value

AssetContainer[]

at line 48
AssetContainer addCss(string $name, string $source, array $dependencies = array(), array $attributes = array())

Add a CSS file to the registered assets.

Parameters

string $name
string $source
array $dependencies
array $attributes

Return Value

AssetContainer

at line 59
AssetContainer addJs(string $name, string $source, array $dependencies = array(), array $attributes = array())

Add a JavaScript file to the registered assets.

Parameters

string $name
string $source
array $dependencies
array $attributes

Return Value

AssetContainer

at line 67
string outputJs(string $container = 'default')

Output a JS asset from the container

Parameters

string $container

Return Value

string

at line 75
string outputCss(string $container = 'default')

Output a CSS asset from the container

Parameters

string $container

Return Value

string