app/AppKernel.php:
...
/**
* @return array
*/
public function registerBundles()
{
return array(
...
new Chaplean\Bundle\OutdatedBrowserBundle\ChapleanOutdatedBrowserBundle(),
);
}
...
app/config/config.yml:
# default option
chaplean_outdated_browser:
background_color: '#f25648'
color: '#ffffff'
lower_than: 'transform'
template: 'ChapleanOutdatedBrowserBundle:Template:outdated.html.twig'
lower_than
can take:
- "IE11","borderImage"
- "IE10", "transform" (Default property)
- "IE9", "boxShadow"
- "IE8", "borderSpacing"
Add this bundle in assetic config:
assetic:
bundles: ['ChapleanOutdatedBrowserBundle']
Include a routing in global routing
app/config/routing.yml:
chaplean_outdated_browser_bundle:
resource: "@ChapleanOutdatedBrowserBundle/Resources/config/routing.yml"
prefix: /
In layout html add me simply:
Version unminified:
<script type="text/javascript" src="{{ path('chaplean-outdated-browser.js') }}"></script>
Version minified:
<script type="text/javascript" src="{{ path('chaplean-outdated-browser.min.js') }}"></script>