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.
composer require locomotivemtl/charcoal-contrib-cookie-consent
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.
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.
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
--TBD--
--TBD--
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.
}
}
--TBD--
Charcoal is licensed under the MIT license.
🚂