Cookie Consent Extension for Yii 2
Cookie Consent plugin and wrapper for Yii2 framework that alerts your users about the use of cookies on website.
For license information check the LICENSE-file.
Documentation is at widgets/CookieWidget.php.
Installation
The preferred way to install this extension is through composer.
Either run
$ php composer.phar require rudissaar/yii2-cookie-consent "*"
or add in composer.json
"rudissaar/yii2-cookie-consent": "*"
Usage
You can load the CookieConsent Widget like this:
use rudissaar\cookieconsent\widgets\CookieWidget;
<?= CookieWidget::widget([
'message' => 'This website uses cookies to ensure you get the best experience on our website.',
'dismiss' => 'Got It',
'learnMore' => 'More info',
'link' => 'https://silktide.com/privacy-policy',
'theme' => 'dark-bottom',
'expiryDays' => 365,
'target' => '_blank',
]); ?>