PHPackages                             dtome/cookie-policy - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. dtome/cookie-policy

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

dtome/cookie-policy
===================

33.6k[2 issues](https://github.com/danitome24/zf2-cookie-policy/issues)PHP

Since Sep 14Pushed 10y ago2 watchersCompare

[ Source](https://github.com/danitome24/zf2-cookie-policy)[ Packagist](https://packagist.org/packages/dtome/cookie-policy)[ RSS](/packages/dtome-cookie-policy/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Author:
-------

[](#author)

Daniel Tomé Fernández

Introduction:
-------------

[](#introduction)

This plugin provide us a top/bottom bar with cookie policy and a button to accept it.

Image:
------

[](#image)

[![promisechains](https://cloud.githubusercontent.com/assets/7501990/9856217/a91cf01c-5b13-11e5-8046-8961bf9dac9d.PNG)](https://cloud.githubusercontent.com/assets/7501990/9856217/a91cf01c-5b13-11e5-8046-8961bf9dac9d.PNG)

Instalation:
------------

[](#instalation)

To install this module you must follow this steps:

1- In your composer.json you must write:

```
"require": {
        "dtome/cookie-policy": "dev-master",
    },
```

and

```
"autoload": {
      "psr-4":{
        "cookiepolicy\\" : "vendor/dtome/cookie-policy"
      }
    }
```

2- Then you must run the following command line `composer update`

Configuration:
--------------

[](#configuration)

1-Enable the module on your `application.config.php`.

```
'modules' => array(
        'cookiepolicy',
    ),
```

2- In your view/layout.phtml paste this code under javascript files call (inside of head tag).

```

    $(document).ready(function () {
        var cookieName = 'cookiePolicyMyWeb';
        var message = 'Example of message. ';
        var messageButton = 'Accept';
        var days = 10;
        var moreInfoRoute = 'https://www.google.es';
        var moreInfoText = 'More info..';
        //bottom or top
        var cookieBarStyle = 'bottom';

        $.fn.cookieBar(cookieName, message, messageButton, moreInfoRoute, moreInfoText, cookieBarStyle);

        $("#cookiebar-button").click(function () {
             $.fn.createCookie(days);
        });
    });

```

3- You must copy the data files to public folder:

```
data/cookieJs.js to public/js
data/cookieStyle.css to public/css

```

4- In your layout.phtml define the javascript file and css file like the following:

```
->prependStylesheet($this->basePath('css/cookieStyle.css'))

->prependFile($this->basePath('js/cookieJs.js'))
```

Usage:
------

[](#usage)

On your `layout.phtml` you must add :

```

```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance7

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f7682b832dd991c83eed4f29cbd4257309dfcc2a672b306e61fafc1918d0236?d=identicon)[danitome24](/maintainers/danitome24)

---

Top Contributors

[![danitome24](https://avatars.githubusercontent.com/u/7501990?v=4)](https://github.com/danitome24 "danitome24 (4 commits)")

### Embed Badge

![Health badge](/badges/dtome-cookie-policy/health.svg)

```
[![Health](https://phpackages.com/badges/dtome-cookie-policy/health.svg)](https://phpackages.com/packages/dtome-cookie-policy)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

307374.3k3](/packages/guava-calendar)[phpmlkit/ndarray

High-performance N-dimensional arrays for PHP, powered by Rust

501.1k3](/packages/phpmlkit-ndarray)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
