asgalex/yii2-evercookie

There is no license information available for the latest version (dev-master) of this package.

Simple evercookie component and widget for Yii2

Installs: 4 433

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 2

Forks: 2

Open Issues: 0

Type:yii2-extension

dev-master 2014-12-09 22:53 UTC

This package is auto-updated.

Last update: 2024-10-17 05:45:55 UTC


README

Simple evercookie component and widget for Yii2

Quick start

  • Add to composer.json:
"require": {
    "asgalex/yii2-evercookie": "dev-master"
}
  • Add component to your project's web config:
$config = [
    'components' => [
        'evercookie' => [
            'class' => 'asgalex\evercookie\EverCookie',
    ]
];
  • Add Evercookie widget to pages with evercookie functionality:
<?= EverCookieWidget::widget(); ?>
  • Now, you have the "evercookie" object in your javascript code!

Configuration

You can configure the evercookie object using component settings. All settings are same as for javascript evercookie object. Example:

$config = [
    'components' => [
        'evercookie' => [
            'class' => 'asgalex\evercookie\EverCookie',
            'java' => false,
            'silverlight' => false,
    ]
];

All settings will be converted to JSON and passed to javascript evercookie object as options.