locomotivemtl/charcoal-contrib-cookie-consent

Charcoal module for cookie consent support useing vanilla-cookieconsent.

1.1.2 2024-09-05 18:02 UTC

This package is auto-updated.

Last update: 2024-11-05 18:20:50 UTC


README

License Latest stable version Supported PHP versions

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

🚂