Download the PHP package albertborsos/yii2-gdpr-cookie-consent without Composer
On this page you can find all versions of the php package albertborsos/yii2-gdpr-cookie-consent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download albertborsos/yii2-gdpr-cookie-consent
More information about albertborsos/yii2-gdpr-cookie-consent
Files in albertborsos/yii2-gdpr-cookie-consent
Package yii2-gdpr-cookie-consent
Short Description GDPR compatible Cookie Consent widget allows the user to choose which kind of cookies they want to accept.
License MIT
Informations about the package yii2-gdpr-cookie-consent
GDPR compatible Cookie Consent widget for Yii 2.0 Framework
GDPR compatible Cookie Consent widget allows the user to choose which kind of cookies they want to accept.
Installation
The preferred way to install this extension is through composer.
Run
Usage
add the component to your config file:
Register the widget in your layout. For example in a _cookieconsent.php partial view.
Add the cookie settings form to any of your controller:
Check your relevant widget is allowed by the user or not with the CookieConsent helper class in the following way:
Consent changes
The default onStatusChange and onRevokeChoice callbacks clear category overrides and reload the current page. This lets server-side checks such as CookieHelper::isAllowedType() apply the new consent immediately, including on landing pages.
Reloading can discard unsaved form values. Applications that manage their integrations without a reload can supply their own callbacks through pluginOptions. Custom callbacks remain responsible for clearing category overrides and applying consent changes.
All versions of yii2-gdpr-cookie-consent with dependencies
yiisoft/yii2 Version ~2.0.0
bower-asset/cookieconsent Version ~3.1
2amigos/yii2-switch-widget Version ^1.0
albertborsos/yii2-ddd Version ~0.2