Manages collections of CSS/Javascript assets
Phalcon\Assets\Manager constructor
Sets the manager’s options
Returns the manager’s options
Sets if the HTML generated must be directly printed or returned
Adds a Css resource to the ‘css’ collection
$assets->addCss('css/bootstrap.css'); $assets->addCss('http://bootstrap.my-cdn.com/style.css', false);
Adds a javascript resource to the ‘js’ collection
$assets->addJs('scripts/jquery.js'); $assets->addJs('http://jquery.my-cdn.com/jquery.js', true);
Adds a resource by its type
$assets->addResourceByType('css', new Phalcon\Assets\Resource\Css('css/style.css'));
Adds a raw resource to the manager
$assets->addResource(new Phalcon\Assets\Resource('css', 'css/style.css'));
Sets a collection in the Assets Manager
$assets->get('js', $collection);
Returns a collection by its id
$scripts = $assets->get('js');
Returns the CSS collection of assets
Returns the CSS collection of assets
Creates/Returns a collection of resources
Traverses a collection calling the callback to generate its HTML
Prints the HTML for CSS resources
Prints the HTML for JS resources
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/2.0.0/api/Phalcon_Assets_Manager.html