Manages collections of CSS/Javascript assets
Sets the manager options
Returns the manager 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 an inline Css to the ‘css’ collection
Adds a javascript resource to the ‘js’ collection
$assets->addJs("scripts/jquery.js"); $assets->addJs("http://jquery.my-cdn.com/jquery.js", false);
Adds an inline javascript to the ‘js’ collection
Adds a resource by its type
$assets->addResourceByType("css", new \Phalcon\Assets\Resource\Css("css/style.css") );
Adds an inline code by its type
Adds a raw resource to the manager
$assets->addResource( new Phalcon\Assets\Resource("css", "css/style.css") );
Adds a raw inline code to the manager
Sets a collection in the Assets Manager
$assets->set("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
Traverses a collection and generate its HTML
Prints the HTML for CSS resources
Prints the HTML for inline CSS
Prints the HTML for JS resources
Prints the HTML for inline JS
Returns existing collections in the manager
Returns true or false if collection exists
© 2011–2017 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/latest/api/Phalcon_Assets_Manager.html