{"id":19857968,"url":"https://github.com/boldare/xsolve-cookie-acknowledgement-bundle","last_synced_at":"2025-07-03T23:37:49.982Z","repository":{"id":57085057,"uuid":"9765893","full_name":"boldare/xsolve-cookie-acknowledgement-bundle","owner":"boldare","description":"This bundle provides information about an cookies usage, which is forced by European Union by so-called EU cookie law.","archived":false,"fork":false,"pushed_at":"2018-07-09T06:25:54.000Z","size":108,"stargazers_count":10,"open_issues_count":1,"forks_count":11,"subscribers_count":71,"default_branch":"master","last_synced_at":"2025-04-15T18:49:42.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://xsolve.pl/opensource","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boldare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-30T07:09:40.000Z","updated_at":"2018-08-06T07:16:50.000Z","dependencies_parsed_at":"2022-08-25T00:50:23.915Z","dependency_job_id":null,"html_url":"https://github.com/boldare/xsolve-cookie-acknowledgement-bundle","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fxsolve-cookie-acknowledgement-bundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fxsolve-cookie-acknowledgement-bundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fxsolve-cookie-acknowledgement-bundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boldare%2Fxsolve-cookie-acknowledgement-bundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boldare","download_url":"https://codeload.github.com/boldare/xsolve-cookie-acknowledgement-bundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251972431,"owners_count":21673602,"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":[],"created_at":"2024-11-12T14:20:33.658Z","updated_at":"2025-05-02T02:30:43.362Z","avatar_url":"https://github.com/boldare.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# About\n\n[![knpbundles.com](http://knpbundles.com/xsolve-pl/xsolve-cookie-acknowledgement-bundle/badge)](http://knpbundles.com/xsolve-pl/xsolve-cookie-acknowledgement-bundle)\n\n[![SensioLabsInsight](https://insight.sensiolabs.com/projects/b87709eb-abae-4825-81a5-88068438e45d/big.png)](https://insight.sensiolabs.com/projects/b87709eb-abae-4825-81a5-88068438e45d)\n\nThis bundle provides information about an cookies usage, which is forced by European Union by so-called [EU cookie law](http://www.ico.org.uk/for_organisations/privacy_and_electronic_communications/the_guide/cookies).\n\nIt includes:\n\n* fast \u0026 easy integration and short learning curve\n* automatic cookie bar injection on the bottom of the page\n* ability to manually inject cookie bar (for example for iframes)\n* ability to change text and \"close button\" name\n* locale aware\n* ability to provide own cookie bar template\n\nThis bundle requires Multibyte String extension.\n\n![Example usage](https://raw.github.com/xsolve-pl/xsolve-cookie-acknowledgement-bundle/master/Resources/doc/xsolve-cookie-acknowledgement-bundle-example.png)\n\n# Installation\n\n1) Add to composer.json\n\n    \"require\": {\n        \"xsolve-pl/xsolve-cookie-acknowledgement-bundle\": \"1.0.*\"\n    },\n\n2) Install dependencies\n\n    composer install\n\n3) Run the bundle in app/AppKernel.php\n\n    public function registerBundles()\n    {\n        return array(\n            // ...\n            new Xsolve\\CookieAcknowledgementBundle\\XsolveCookieAcknowledgementBundle(),\n        );\n    }\n\n# Usage\n\n## For all static pages\n\nBy default the cookie bar will be visible on every page after turning on bundle.\n\n## For iframes\n\nDisable response injection in app/config/config.yml\n\n    xsolve_cookie_acknowledgement:\n        response_injection: false\n\nInclude cookie bar in appropriate location\n\n    {% include 'XsolveCookieAcknowledgementBundle::cookie_acknowledgement_bar.html.twig' %}\n\n## Configuration options\n\nConfiguration can be adjusted in app/config/config.yml\n\n    xsolve_cookie_acknowledgement:\n        response_injection: true # default true\n        template: custom_cookie_bar.html.twig # twig template name, default: XsolveCookieAcknowledgementBundle::cookie_acknowledgement_bar.html.twig\n\n## Altering cookie bar texts\n\nPlace tranlations file in your app directory:\n\n    app/Resources/translations/XsolveCookieAcknowledgementBundle.en.yml\n\nAnd change texts\n\n    cookie.message: My message\n    cookie.message.accept: Accept button text\n\nOf course you can set up those texts in as many locales as you want.\n\n## Altering cookie bar apperance\n\nBy default cookie bar comes with some default styles. If you wish to change those, use CSS. For example you may want pink background with placement on top of the page:\n\n    #cookie-law-info-bar {\n        background: pink !important;\n        top: 50px !important;\n        bottom: auto !important;\n    }\n\nPlease note that every style needs ```!important``` to override provided inline styles.\n\n## Altering whole cookie bar template\n\nYou use your own template by setting it in the configuration (app/config/config.yml):\n\n    xsolve_cookie_acknowledgement:\n        template: ::custom_cookie_bar.html.twig\n\nIn above case template is located in app/Resources/custom_cookie_bar.html.twig\n\nAlso base template can be reused be Twig extension (two blocks are used: xsolve_cookie_message and xsolve_cookie_message_js), see example below:\n\n    {% extends \"XsolveCookieAcknowledgementBundle::cookie_acknowledgement_bar.html.twig\" %}\n\n    {% block xsolve_cookie_message %}\n        {{ parent() }}\n        \u003cdiv\u003eThis is something custom\u003c/div\u003e\n    {% endblock %}\n\n    {% block xsolve_cookie_message_js %}\n        {{ parent() }}\n        \u003cscript type=\"text/javascript\"\u003e\n            document.getElementById('js-cookie-law-close-button').onclick = function () {\n                alert('Got ya!');\n            }\n        \u003c/script\u003e\n    {% endblock %}\n\n# Automated testing\n\nThere are fe simple test to make sure that everything works fine. To run tests include this bundle\ninto some Symfony2 project (Symfony Standard Edition is enough). Then put testsuite in app/phpunit.xml\n\n    \u003ctestsuite name=\"XSolve Cookie Acknowledgement Bundle Suite\"\u003e\n        \u003cdirectory\u003e../vendor/xsolve-pl/xsolve-cookie-acknowledgement-bundle/Xsolve/CookieAcknowledgementBundle/Tests/\u003c/directory\u003e\n    \u003c/testsuite\u003e\n\nAnd run\n\n    phpunit -c app/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboldare%2Fxsolve-cookie-acknowledgement-bundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboldare%2Fxsolve-cookie-acknowledgement-bundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboldare%2Fxsolve-cookie-acknowledgement-bundle/lists"}