{"id":19693483,"url":"https://github.com/ezsystems/ezsystemsprivacycookiebundle","last_synced_at":"2025-04-29T09:31:43.073Z","repository":{"id":29709160,"uuid":"33252077","full_name":"ezsystems/EzSystemsPrivacyCookieBundle","owner":"ezsystems","description":"This bundle adds privacy cookie banner into Symfony applications","archived":false,"fork":false,"pushed_at":"2019-05-13T13:29:24.000Z","size":50,"stargazers_count":2,"open_issues_count":3,"forks_count":11,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-04-20T03:04:11.871Z","etag":null,"topics":["ez-platform","php","privacy-cookie-bundle","symfony","symfony-bundle"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ezsystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-01T14:25:12.000Z","updated_at":"2024-10-10T07:11:08.000Z","dependencies_parsed_at":"2022-09-06T07:41:03.390Z","dependency_job_id":null,"html_url":"https://github.com/ezsystems/EzSystemsPrivacyCookieBundle","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2FEzSystemsPrivacyCookieBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2FEzSystemsPrivacyCookieBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2FEzSystemsPrivacyCookieBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ezsystems%2FEzSystemsPrivacyCookieBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ezsystems","download_url":"https://codeload.github.com/ezsystems/EzSystemsPrivacyCookieBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251473427,"owners_count":21595051,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ez-platform","php","privacy-cookie-bundle","symfony","symfony-bundle"],"created_at":"2024-11-11T19:17:01.967Z","updated_at":"2025-04-29T09:31:42.842Z","avatar_url":"https://github.com/ezsystems.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Privacy Cookie Bundle\n\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3687a8b0-c268-49cf-b072-15a10d920709/big.png)](https://insight.sensiolabs.com/projects/3687a8b0-c268-49cf-b072-15a10d920709)\n\nThis bundle adds privacy cookie banner into Symfony applications.\n\n![screenshot](https://cloud.githubusercontent.com/assets/3033038/14012485/5087f198-f1a6-11e5-881c-028bbe806cb3.png)\n\n## Requirements\n\n- Symfony v2.6 or later (including Symfony 3.x)\n\n## Installation\nThis package is available via Composer, so the instructions below are similar to how you install any other open source Symfony Bundle.\n\nRun the following command in a terminal, from your Symfony installation root (pick most recent release):\n```bash\nphp composer.phar require ezsystems/privacy-cookie-bundle\n```\n\nEnable the bundle in `app/AppKernel.php` file:\n\n```php\n$bundles = array(\n    // existing bundles\n    new EzSystems\\PrivacyCookieBundle\\EzSystemsPrivacyCookieBundle(),\n);\n```\n\nAdd external assets to your bundle:\n\n- CSS:\n```\nbundles/ezsystemsprivacycookie/css/privacycookie.css\n```\n\n- JS:\n```\nbundles/ezsystemsprivacycookie/js/privacycookie.js\n```\n\n### Assetic (*Optional*)\nEnable the Assetic bundle in `app/AppKernel.php` file:\n\n$bundles = array(\n    // ...\n    // starting from Symfony 2.8 you have to enable AsseticBundle manually if you haven't done it before\n    new Symfony\\Bundle\\AsseticBundle\\AsseticBundle()\n);\n\n\nAdd the following minimal configuration in `config.yml` file to enable `Assetic` support in your application (Symfony 2.8 and later):\n\n```yaml\nassetic:\n    debug: '%kernel.debug%'\n    use_controller: '%kernel.debug%'\n    filters:\n        cssrewrite: ~\n```\n\nIf you are installing the bundle via `composer require` you must also copy assets to your project's `web` directory. You can do this by calling Symfony's built-in command from the project root directory:\n\nFor Symfony 2.x:\n\n```bash\nphp app/console assets:install --symlink\n```\n\nFor Symfony 3.x:\n\n```bash\nphp bin/console assets:install --symlink\n```\n\nIn production environment you have to dump assets using `Assetic` built-in command:\n\nFor Symfony 2.x:\n\n```bash\nphp app/console assetic:dump -e=prod\n```\n\nFor Symfony 3.x:\n\n```bash\nphp bin/console assetic:dump -e=prod\n```\n\n## Usage\n\nInsert the following `{{ show_privacy_cookie_banner(%privacy_policy_url%) }}` helper somewhere in your footer template before the body ending tag. Replace the `%privacy_policy_url%` parameter with your policy page address.\n\nNote that the `%privacy_policy_url%` parameter is not required, in this case no policy link will be shown.\n\nThe following optional parameters can be set as a second argument in an array format:\n\nParameter        | Default value                                  | Description\n---------------- | ---------------------------------------------- | -----------\ncookieName       | privacyCookieAccepted                          | Sets your own status cookie name\ncookieValidity   | 365                                            | Says how many days privacy banner should be hidden when user accepts policy?\ncookiePath       | null                                           | Specifies the cookie path (by default cookie will be available only for the current domain)\ncaption          | Cookies help us create a good experience (...) | Sets your own banner message caption\nlearnMoreText    | Learn More                                     | Sets title and text of privacy link\nextraParams      | Extra Params                                   | Send extra params in your override template\n\nExample of usage in standard Symfony application:\n\n```twig\n{{ show_privacy_cookie_banner('http://ez.no/Privacy-policy') }}\n```\n\nor\n\n```twig\n{{ show_privacy_cookie_banner('http://ez.no/Privacy-policy', {\n   cookieName: 'myCookie',\n   cookieValidity: 7,\n   cookiePath: '/',\n   caption: 'Nice to see you here',\n   learnMoreText: 'Find out more'\n}) }}\n```\n\nIf you are using eZ Publish / Platform you can use `ez_urlalias` to generate path for specified content object:\n\n```twig\n{{ show_privacy_cookie_banner(path('ez_urlalias', {contentId: 94}), {\n   cookieName: 'myCookie',\n   cookieValidity: 7,\n   caption: 'Nice to see you here'\n}) }}\n```\n\nExample of usage extraParams:\n\n```twig\n{{ show_privacy_cookie_banner('http://ez.no/Privacy-policy', {\n   cookieName: 'myCookie',\n   extraParams: {\n       my_param1: value_my_param1 ,\n       my_param2: value_my_param2\n   }\n}) }}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezsystems%2Fezsystemsprivacycookiebundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fezsystems%2Fezsystemsprivacycookiebundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fezsystems%2Fezsystemsprivacycookiebundle/lists"}