Skip to content

hiqdev/yii2-cookie-consent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yii2 Cookie Consent

Latest Stable Version Total Downloads Build Status Scrutinizer Code Coverage Scrutinizer Code Quality

Provides really easy alerting users about the use of cookies on your site.

Cookie consent is required to comply with the EU Cookie Law.

Additionally it detects if cookie is disabled in user's browser and redirects user to predefined page.

Works by adding Behavior to the Application View. Behavior listens to EVENT_END_BODY and echos the consent script.

Installation

The preferred way to install this yii2-extension is through composer.

Either run

php composer.phar require "hiqdev/yii2-cookie-consent"

or add

"hiqdev/yii2-cookie-consent": "*"

to the require section of your composer.json.

Configuration

This extension is supposed to be used with composer-config-plugin.

Else look src/config/web.php for cofiguration example.

Available configuration parameters:

  • cookieConsent.disabled
  • cookieConsent.params
    • message - message to be shown
    • dismiss
    • theme
    • more
    • moreLink
    • failUrl - url user will be redirected when cookies are disabled

For more details please see src/config/params.php.

License

This project is released under the terms of the BSD-3-Clause license. Read more here.

Copyright © 2017, HiQDev (http://hiqdev.com/)

Acknowledgements

About

Yii2 Cookie Consent

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors