Assets Management
Assets Management
Phalcon\Assets is a component that allows the developer to manage static resources such as css stylesheets or javascript libraries in a web application.
Phalcon\Assets\Manager is available in the services container, so you can add resources from any part of the application where the container is available.
Adding Resources
Assets supports two built-in resources: css and javascripts. You can create other resources if you need. The assets manager internally stores two default collections of resources one for javascript and another for css.
You can easily add resources to these collections like follows:
class IndexController extends Phalcon\Mvc\Controller { public function index() { //Add some local CSS resources