定制 uam/cookie-consent-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

uam/cookie-consent-bundle

Composer 安装命令:

composer require uam/cookie-consent-bundle

包简介

Add a banner allowing the user to consent to your symfony app's cookie policy

README 文档

README

A symfony 2 bundale that provides a convenient way to allow the user to consent to your symfony app's cookie policy.

Installation

Add the bundle to your project's composer.json:

{
    "require": {
        "uam/cookie-consent-bundle": "^1.0",
        ...
    }
}

Run composer install or composer update to install the bundle:

$ php composer.phar update

Enable the bundle in the app's kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new UAM\CookieConsent\CookieConsentBundle\UAMCookieConsentBundle(),
    );
}

If your composer.json does not include the post-install or post-update installAssets script handler, then run the following command:

$ php app/console assets:install

or

$ php app/console assets:install --symlink

Usage

# base.html.twig

{% stylesheets filter="cssrewrite"
    'bundles/uamcookieconsent/css/cookie-consent.css'
%}
	<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}

{% javascripts
	'bundles/uamcookieconsent/js/cookie-consent.js'
%}
	<script src="{{ asset_url }}"></script>
{% endjavascripts %}

If you use assetic, you need to declare the UAMCookieConsentBundle in your config file's assetic section.

# base.html.twig

{% stylesheets filter="cssrewrite"
    '@uam_cookie_consent_css'
%}
    <link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />
{% endstylesheets %}

{% javascripts
    '@uam_cookie_consent_js'
%}
    <script src="{{ asset_url }}"></script>
{% endjavascripts %}

Licence

This bundle is licensed under the MIT license.

The dataTables jquery plugin is licensed under the MIT license.

Copyright

This bundle is copyright United Asian Management Limited.

The dataTables jquery plugin is copyright Allan Jardine (www.sprymedia.co.uk).

All rights reserved by their respective copyright holders.

统计信息

  • 总下载量: 97
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-22

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固