indigophp/cookie-consent-bundle

此包已废弃,不再维护。未建议替代包。

Symfony Bundle 用于流行的 Cookie Consent 插件

v0.2.0 2015-12-08 20:04 UTC

This package is auto-updated.

Last update: 2021-11-24 09:10:03 UTC


README

Latest Version Software License Build Status Code Coverage Quality Score Total Downloads

Symfony Bundle 用于流行的 Cookie Consent 插件.

安装

通过 Composer

$ composer require indigophp/cookie-consent-bundle

在您的内核中启用此包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Indigo\Bundle\CookieConsentBundle\IndigoCookieConsentBundle(),
    );
}

使用方法

Cookie Consent 添加到您的网站。

配置此包

indigo_cookie_consent:
    options:
        # any options you would pass to the plugins (except labels: message, dismiss, learnMore)
        # see https://silktide.com/tools/cookie-consent/docs/installation
    script: false # You can turn script off or pass a script location (eg. to use a specific version)

注意:标签会自动翻译。翻译在 IndigoCookieConsentBundle 域内(欢迎PR)。

在您的 Twig 模板中使用 cookie_consent_render 方法:{{ cookie_consent_render() }}

测试

$ composer test

贡献

请参阅 CONTRIBUTINGCONDUCT 以获取详细信息。

安全

如果您发现任何安全相关的问题,请通过 security@indigophp.com 联系我们。

鸣谢

感谢 David Buchmann 帮助我开发第一个 Symfony Bundle(tm)。

许可协议

MIT 许可协议(MIT)。请参阅 许可文件 以获取更多信息。