ecedi/vars-bundle by Agence Ecedi
this is a simple bundle with no UI, (API only) that replicate CMS like Drupal or Wordpress capacity to store configuration in Database.
{
"require": {
"ecedi/vars-bundle": "dev-master",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ecedi/vars-bundle"
}
]
}
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Ecedi\VarsBundle\EcediVarsBundle(),
// ...
);
}
app/console doctrine:schema:update --force
$vm = $container->get('ecedi.vars.variable_manager'):
$config = $vm->get('my.parameter', 'default_value');
$vm->set('my.parameter', 'value');