Download the PHP package yproximite/asset-dependency-bundle without Composer
On this page you can find all versions of the php package yproximite/asset-dependency-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package asset-dependency-bundle
Asset Dependency Bundle
This bundle enables TWIG templates to declare that they need stylesheets and javascripts.
Usage
Twig templates can declare their dependencies like this:
{{ depends_on_stylesheet(['bundles/foobar/css/style.css']) }}
{{ depends_on_javascript(['bundles/foobar/js/jquery.js']) }}
Each dependency is then included once when the response is rendered.
The bundle also allows you to specify aliases in the configuration:
// app/config.yml
ylly_asset_dependency:
javascript_alias_map:
jquery: bundles/foobar/js/jquery.js
jquery-ui: bundles/foobar/js/jquery-ui.js
stylesheet_alias_map:
style: bundles/foobar/css/style.css
// sometemplate.html.twig
{{ depends_on_stylesheet(['@style']) }}
{{ depends_on_javascript(['@jquery']) }}
To include the dependencies in your layout insert the following placeholders:
<!-- YLLY_ASSET_DEPENDENCY_STYLESHEETS !-->
<!-- YLLY_ASSET_DEPENDENCY_JAVASCRIPTS !-->
All versions of asset-dependency-bundle with dependencies
PHP Build Version
Package Version
No informations.
The package yproximite/asset-dependency-bundle contains the following files
Loading the files please wait ...