2017 © Pedro Peláez
 

library symfony-utils-bundle

Bunch of utilities for Symfony2

image

siciarek/symfony-utils-bundle

Bunch of utilities for Symfony2

  • Tuesday, December 24, 2013
  • by siciarek
  • Repository
  • 2 Watchers
  • 2 Stars
  • 90 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

symfony-utils-bundle

Symfony2 scripts and utilities., (*1)

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:, (*2)

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

Now tell composer to download the bundle by running the command:, (*3)

``` bash $ php composer.phar update siciarek/symfony-utils-bundle, (*4)


Composer will install the bundle to your project's `vendor/siciarek` directory. Enable the bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Siciarek\SymfonyUtilsBundle\SiciarekSymfonyUtilsBundle(), ); }

Privacy policy bar (accept cookies)

Enable

``` yaml, (*5)

app/config/config.yml

siciarek_symfony_utils: accept_cookies: enabled: true ````, (*6)

Twig helper

Using default configuration values, (*7)

``` html+jinja {{ accept_cookies() }}, (*8)


Using custom url ``` html+jinja {{ accept_cookies('http://somedomain.com/docs/my-special-privacy-policy' }}

Default configuration

Default values, (*9)

``` yaml, (*10)

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', (*11)

```, (*12)

The Versions