shapecode/cookie-consent-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Symfony Bundle for the Cookie Consent Plugin.

1.2.0 2020-10-16 23:21 UTC

README

Latest Stable Version Total Downloads Latest Unstable Version License

Symfony Bundle for the popular Cookie Consent plugin.

Install

Via Composer

$ composer require shapecode/cookie-consent-bundle

Enable the bundle in your kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Shapecode\Bundle\CookieConsentBundle\ShapecodeCookieConsentBundle(),
    );
}

Usage

Configure the bundle:

shapecode_cookie_consent:
    // url to your privacy policy 
    policy_url: http://example.com/privacy
    
    // default layout options
    layout:
        position: top  
        static: false
        theme: edgeless
        palette:
            popup:
                background: #252e39
                text: #ffffff
            button:
                background: #14a7d0
                text: #ffffff

Note: Translations are in ShapecodeCookieConsent.de domain.

Use the cookie_consent method in your Twig template: {{ cookie_consent() }}

License

The MIT License (MIT). Please see License File for more information.