Skip to content

siciarek/symfony-utils-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

symfony-utils-bundle

Symfony2 scripts and utilities.

Overview

  • {{ accept_cookies() }} cookie privacy policy bar as a twig function
  • config/cli-config.php configuration file for bin/doctrine
  • bin/selenium selenium server script with all dependencies
  • bin/xbehat behat script with gherkin i18n configuration support

Installation

Add SiciarekSymfonyUtilsBundle in your composer.json:

{
    "require": {
        "siciarek/symfony-utils-bundle": "dev-master"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update siciarek/symfony-utils-bundle

Composer will install the bundle to your project's vendor/siciarek directory.

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Siciarek\SymfonyUtilsBundle\SiciarekSymfonyUtilsBundle(),
    );
}

Privacy policy bar (accept cookies)

Enable

# app/config/config.yml

siciarek_symfony_utils:
    accept_cookies:
        enabled: true

Twig helper

Using default configuration values

{{ accept_cookies() }}

Using custom url

{{ accept_cookies('http://somedomain.com/docs/my-special-privacy-policy' }}

Default configuration

Default values

# app/config/config.yml

siciarek_symfony_utils:
    accept_cookies:
        enabled: false
        stylesheet: /bundles/siciareksymfonyutils/css/cookiesbar.css
        cookie_name: cookies_accepted
        privacy_policy_url: privacy-policy
        template: 'SiciarekSymfonyUtilsBundle:Common:cookiesbar.html.twig'

About

Symfony2 Utils Bundle.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published