locomotivemtl / charcoal-contrib-cookie-consent
Charcoal module for cookie consent support useing vanilla-cookieconsent.
Requires
- php: ^7.4 || ^8.0
- ext-intl: *
- ext-json: *
- charcoal/config: ^5.0
- charcoal/core: ^5.0
- charcoal/object: ^5.0
- charcoal/property: ^5.0
- charcoal/translator: ^5.0
- pimple/pimple: ^3.5
Requires (Dev)
- charcoal/app: ^5.0
- php-coveralls/php-coveralls: ^2.2
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^9.5
- seld/jsonlint: ^1.10
- squizlabs/php_codesniffer: ^3.8
- vimeo/psalm: ^5.17
README
The Charcoal Cookie Consent package provides an integration with vanilla-cookieconsent for a simple cross-browser plugin written in vanilla JS that is configurable from the Admin.
Installation
composer require locomotivemtl/charcoal-contrib-cookie-consent
Setup
Charcoal Module
For Charcoal projects, the module can be registered from your configuration file:
{ "modules": { "charcoal/cookie-consent/cookie-consent": {} } }
The module will automatically register the service provider, the metadata path, and the Admin dashboard routing.
Charcoal Service Provider
If you are not using the module, the service provider can be registered from your configuration file:
{ "service_providers": { "charcoal/cookie-consent/cookie-consent": {} } }
Consult the package configuration files for what to add to your project.
Models
After the module or service provider has been registered, create the database table for the primary model for configuring and disclosing cookie consent information:
./vendor/bin/charcoal admin/object/table/create --obj-type=charcoal/cookie-consent/model/disclosure ./vendor/bin/charcoal admin/object/table/create --obj-type=charcoal/cookie-consent/model/category
Service Provider
Parameters
--TBD--
Services
--TBD--
Configuration
If you are using the module, the package can be configured via its module registration:
{ "modules": { "charcoal/cookie-consent/cookie-consent": { // See available options below. } } }
Alternatively, it can be configured via your application configuration:
{ "cookie_consent": { // See available options below. } }
Usage
--TBD--
Credits
License
Charcoal is licensed under the MIT license.
Resources
🚂