Symfony2 scripts and utilities.
{{ accept_cookies() }}
cookie privacy policy bar as a twig functionconfig/cli-config.php
configuration file forbin/doctrine
bin/selenium
selenium server script with all dependenciesbin/xbehat
behat script with gherkin i18n configuration support
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(),
);
}
# app/config/config.yml
siciarek_symfony_utils:
accept_cookies:
enabled: true
Using default configuration values
{{ accept_cookies() }}
Using custom url
{{ accept_cookies('http://somedomain.com/docs/my-special-privacy-policy' }}
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'