Database centric Symfony2 configuration management bundle. Global and per-entity settings supported.
MIT License
Bundle for storing configuration with Symfony in database using Doctrine ORM.
👀 This bundle was previously known as dmissh/settings-bundle
, and the Packagist installation instruction will stay as is.
serialize()
and JSON (+ you can write your own)Symfony controller:
// Global settings
$settingsManager->set('name', 'foo');
$settingsManager->get('name'); // returns 'foo'
// User settings
$settingsManager->get('name', $user); // returns global 'foo'
$settingsManager->set('name', 'bar', $user);
$settingsManager->get('name', $user); // returns 'bar'
Twig template:
{# Global setting #}
{{ get_setting('some_setting') }} {# => 'value' #}
{# User setting #}
{{ get_setting('some_user_setting', app.user) }} {# => 'value' #}
See the general usage documentation for more examples.
Please, do not hesitate to report bugs or send pull requests. It will help to motivate me to support library better than anything else :)
See CHANGELOG.md for all major changes.
Make sure to read the UPGRADE.md to successfully migrate your application.
The MIT License. For the full text of license, please, see LICENSE