dev-master
9999999-dev http://github.com/gfilipiak/CookieBundleThis bundle provides Cookie Statement layer
MIT
The Requires
- php >=5.3.2
- symfony/symfony >=2.3.0
by Gabriel Filipiak
cookie layer statement
Wallogit.com
2017 © Pedro Peláez
This bundle provides Cookie Statement layer
This bundle provides a simple cookie statement layer with customizable template., (*1)
Installing this bundle can be done through these simple steps:, (*2)
// composer.json
{
// ...
require: {
// ...
"gfilipiak/cookie-bundle": "dev-master"
}
}
composer update
````
3. Add the bundle to your application kernel:
```php
// application/ApplicationKernel.php
public function registerBundles()
{
// ...
$bundle = array(
// ...
new ConWeb\Bundle\CookieBundle\CookieBundle(),
);
// ...
return $bundles;
}
cookie:
resource: "@CookieBundle/Resources/config/routing.xml"
prefix: /
You can change the default statement template by placing configuration parameters in your config.yml file:, (*3)
cookie:
template: AcmeBundle:Cookie:statement.html.twig
Template should have fallowing structure:, (*4)
{% if not accepted %}
{% stylesheets '@CookieBundle/Resources/public/less/style.less' %}
<link rel="stylesheet" href="{{ asset_url }}">
{% endstylesheets %}
<section class="cookie">
Your statement here.
<section class="agree-button">
<button id="cookieAgree" class="btn-success btn-small" data-ajax-url="{{ path('cookie_accept') }}">
Akceptuję
</button>
</section>
</section>
{% javascripts '@CookieBundle/Resources/public/js/script.js' %}
<script type="text/javascript" src="{{ asset_url }}"></script>
{% endjavascripts %}
{% endif %}
TODO: - customize only the stamement text not the whole template - customize less path, (*5)
This bundle provides Cookie Statement layer
MIT
cookie layer statement