Download the PHP package setono/consent-bundle without Composer
On this page you can find all versions of the php package setono/consent-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download setono/consent-bundle
More information about setono/consent-bundle
Files in setono/consent-bundle
Package consent-bundle
Short Description A Symfony bundle that integrates the consent contracts
License MIT
Informations about the package consent-bundle
Symfony Consent Bundle
This bundle integrates the consent contracts into Symfony.
Installation
This installs and enables the plugin automatically if you're using Symfony Flex. If not, add the bundle manually
to bundles.php
.
Configuration
Consents
The default configuration has all (default) consents (marketing, preferences, and statistics) set to false
. If you want to
change these defaults, you can easily do so:
The above configuration will effectively change the default consent to true
for all permissions.
Consent checker
If you want to use a different consent checker, you can easily do so by implementing the ConsentCheckerInterface
and
setting your own service id as the consent checker:
Usage
The bundle provides a StaticConsentChecker
that uses the above consents
array as an input.
You can then autowire the ConsentCheckerInterface
and check for a granted consent:
All versions of consent-bundle with dependencies
setono/consent-contracts Version ^1.1
symfony/config Version ^5.4 || ^6.0 || ^7.0
symfony/dependency-injection Version ^5.4 || ^6.0 || ^7.0
symfony/http-kernel Version ^5.4 || ^6.0 || ^7.0