shapecode/cookie-consent-bundle

此包已被放弃且不再维护。未建议替代包。

Symfony Bundle 用于 Cookie Consent 插件。

1.2.0 2020-10-16 23:21 UTC

README

Latest Stable Version Total Downloads Latest Unstable Version License

Symfony Bundle 用于流行的 Cookie Consent 插件

安装

通过 Composer

$ composer require shapecode/cookie-consent-bundle

在您的内核中启用此包

<?php
// app/AppKernel.php

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

使用方法

配置此包

shapecode_cookie_consent:
    // url to your privacy policy 
    policy_url: http://example.com/privacy
    
    // default layout options
    layout:
        position: top  
        static: false
        theme: edgeless
        palette:
            popup:
                background: #252e39
                text: #ffffff
            button:
                background: #14a7d0
                text: #ffffff

注意:翻译位于 ShapecodeCookieConsent.de 域。

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

许可

MIT 许可证 (MIT)。有关更多信息,请参阅 许可文件