2017 © Pedro Peláez
 

symfony-bundle gdpr-bundle

This bundle provides a GDPR conform cookie information inside the sonata-project.

image

core23/gdpr-bundle

This bundle provides a GDPR conform cookie information inside the sonata-project.

  • Saturday, July 14, 2018
  • by core23
  • Repository
  • 0 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 200 % Grown

The README.md

NucleosGDPRBundle

Latest Stable Version Latest Unstable Version License, (*1)

Total Downloads Monthly Downloads Daily Downloads, (*2)

Continuous Integration Code Coverage Type Coverage, (*3)

This bundle provides a GDPR conform cookie information for symfony applications., (*4)

Installation

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*5)

composer require nucleos/gdpr-bundle

Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in config/bundles.php file of your project:, (*6)

// config/bundles.php

return [
    // ...
    Nucleos\NucleosGDPRBundle\NucleosGDPRBundle::class => ['all' => true],
];

Block cookies

By default all cookies are kept, also the cookie consent was not set. To block all domain cookies, you can set the following config., (*7)

# config/packages/nucleos_gdpr.yaml

nucleos_gdpr:
    block_cookies: null

You can define a list of cookies that are kept:, (*8)

# config/packages/nucleos_gdpr.yaml

nucleos_gdpr:
    block_cookies:
        keep:
          - PHPSESSID
          - ADMIN_.*

Google FLoC (Federated Learning of Cohorts)

By default a Permissions-Policy header is added to every response to respect user privacy. You can enable Google FLoC tracking via the following configuration:, (*9)

# config/packages/nucleos_gdpr.yaml

nucleos_gdpr:
    privacy:
        google_floc: true

Assets

It is recommended to use webpack / webpack-encore to include the GdprPopup.js and GdprPopup.css file in your page. These files are located in the assets folder., (*10)

Usage

{# template.twig #}

{{ sonata_block_render({ 'type': 'nucleos_gdpr.block.information' }, {
    'url': 'https://example.com/gdpr',
    'text': 'Example text' // optional
}) }}

License

This bundle is under the MIT license., (*11)

The Versions