it-blaster/config-bundle

Symfony2 bundle, adds config list to Sonata

v1.0.2 2015-06-17 07:17 UTC

This package is not auto-updated.

Last update: 2024-11-09 18:38:00 UTC


README

Build Status Scrutinizer Code Quality

Installation

Add to composer.json and install

{
    "require": {
        "it-blaster/config-bundle": "dev-master"
	},
}

Add bundle to AppKernel.php

<?php
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new ItBlaster\ConfigBundle\ItBlasterConfigBundle(),
    );
}

Build models

$ php app/console propel:build

Usage

Use get method wherever you need

$value = Config::get('config_key', $request->getLocale());

Twig function:

{{ config('social_twitter_link', app.request.locale) }}