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: 2022-01-22 03:12:53 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) }}