locomotivemtl/charcoal-contrib-cookie-consent

使用 vanilla-cookieconsent 实现的 cookie 同意支持的 charcoal 模块。

1.1.2 2024-09-05 18:02 UTC

This package is auto-updated.

Last update: 2024-09-05 18:02:36 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.

安装

composer require locomotivemtl/charcoal-contrib-cookie-consent

设置

Charcoal 模块

对于 Charcoal 项目,您可以从配置文件注册该模块

{
    "modules": {
        "charcoal/cookie-consent/cookie-consent": {}
    }
}

模块将自动注册服务提供者、元数据路径和 Admin 控制台路由。

Charcoal 服务提供者

如果您不使用模块,可以从配置文件注册服务提供者

{
    "service_providers": {
        "charcoal/cookie-consent/cookie-consent": {}
    }
}

请参阅包配置文件以了解如何将内容添加到您的项目中。

模型

在模块或服务提供者注册后,创建用于配置和披露 cookie 同意信息的数据库表

./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--

配置

如果您使用模块,可以通过模块注册配置该包

{
    "modules": {
        "charcoal/cookie-consent/cookie-consent": {
            // See available options below.
        }
    }
}

或者,您可以通过应用程序配置进行配置

{
    "cookie_consent": {
        // See available options below.
    }
}

用法

--TBD--

致谢

许可证

Charcoal 在 MIT 许可证 下授权。

资源

🚂