Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rvanlaak/settingsbundle
Database centric Symfony2 configuration management bundle. Global and per-entity settings supported.
https://github.com/rvanlaak/settingsbundle
Last synced: 7 days ago
JSON representation
Database centric Symfony2 configuration management bundle. Global and per-entity settings supported.
- Host: GitHub
- URL: https://github.com/rvanlaak/settingsbundle
- Owner: rvanlaak
- License: mit
- Created: 2013-11-01T21:26:08.000Z (about 11 years ago)
- Default Branch: 3.x
- Last Pushed: 2023-05-12T19:49:34.000Z (over 1 year ago)
- Last Synced: 2024-06-21T06:40:35.511Z (7 months ago)
- Language: PHP
- Homepage:
- Size: 287 KB
- Stars: 114
- Watchers: 11
- Forks: 61
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
SettingsBundle
==============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.
## Features
* Easy-to-use (Twig extension, container service)
* Settings scopes per user, global or all
* Settings validation by using the Symfony Form Component
* 2 serialization mechanisms: PHP `serialize()` and JSON (+ you can write your own)
* Settings caching (PSR-6)
* Fast and extensible## Quick usage examples
Symfony controller:
```php
// 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:
```twig
{# Global setting #}
{{ get_setting('some_setting') }} {# => 'value' #}{# User setting #}
{{ get_setting('some_user_setting', app.user) }} {# => 'value' #}
```See the [general usage](/Resources/doc/general-usage.md) documentation for more examples.
## Documentation
* [Installation](/Resources/doc/installation.md)
* [General usage](/Resources/doc/general-usage.md)
* [Scopes](/Resources/doc/scopes.md)
* [Advanced configuration](/Resources/doc/advanced-configuration.md)
* [I18n](/Resources/doc/i18n.md)
* [Customization](/Resources/doc/customization.md)
* [FAQ](/Resources/doc/faq.md)## Changelog, Roadmap and contribution
Please, do not hesitate to [report bugs](https://github.com/dmishh/SettingsBundle/issues) or send
[pull requests](https://github.com/dmishh/SettingsBundle/pulls). It will help to motivate me to support
library better than anything else :)See [CHANGELOG.md](CHANGELOG.md) for all major changes.
### Upgrade from 1.0.*
Make sure to read the [UPGRADE.md](UPGRADE.md) to successfully migrate your application.
## License
The MIT License. For the full text of license, please, see [LICENSE](/LICENSE)