pixelopen/sulu-gdprbundle

GDPR tools for Sulu

Installs: 63

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:sulu-bundle

2.5.0 2024-05-28 16:02 UTC

This package is auto-updated.

Last update: 2024-10-28 16:58:00 UTC


README

GitHub release (with filter) Dependency Quality Gate Status

Presentation

A Sulu bundle to easily manage the GDPR. It also allows you to manage the consent banner by using the Tarteaucitron consent management system.

Requirements

  • PHP >= 8.0
  • Sulu >= 2.5.*
  • Symfony >= 5.4
  • Composer

Installation

Install the bundle

Execute the following composer command to add the bundle to the dependencies of your project:

composer require pixelopen/sulu-gdprbundle

Enable the bundle

Enable the bundle by adding it to the list of registered bundles in the config/bundles.php file of your project:

return [
    /* ... */
    Pixel\GDPRBundle\GDPRBundle::class => ['all' => true],
];

Update schema (for dev environnement)

bin/console do:sch:up --force

Bundle Config

Define the Admin Api Route in routes_admin.yaml

gdpr.setting_api:
  type: rest
  prefix: /admin/api
  resource: pixel_gdpr.settings_route_controller
  name_prefix: gdpr.

Use

The bundle is only composed of the settings, which make the management of the GDPR very easy.

To use the GDPR management of the bundle, just check the "Use cookies management?". All the other options should be display.

The Services section will take care to manage the different cookies scripts.

The Parameters section will help you manage the Tarteaucitron banner, which displays the consent banner. There are plenty of parameters, so don't hesitate to visit the repository of Tarteaucitron.

Twig extension

The bundle comes with two twig functions:

gdpr_settings(): returns the settings of the bundle. No parameters are required.

Example of use:

{% set gdprSettings = gdrp_settings() %}
{{ gdprSettings.useCookiesHandleing }}

gdprScripts(): renders the consent banner. No parameters are required.

Example of use:

{{ gdpr_scripts() }}

Contributing

You can contribute to this bundle. The only thing you must do is respect the coding standard we implements. You can find them in the ecs.php file.