aamant / config-bundle
Symfony ConfigBundle
Installs: 112
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/aamant/config-bundle
Requires
- php: >=5.6.0
- symfony/form: ^2.8 || ^3.0
- symfony/framework-bundle: ^2.8 || ^3.0
- symfony/security-bundle: ^2.8 || ^3.0
- symfony/templating: ^2.8 || ^3.0
- symfony/twig-bundle: ^2.8 || ^3.0
- twig/twig: ^1.28 || ^2.0
Requires (Dev)
- phpunit/phpunit: ^6
This package is not auto-updated.
Last update: 2025-09-28 07:52:42 UTC
README
Install
Install with composer
composer require aamant/config-bundle
Modify AppKernel.php
$bundles = [
...
new Aamant\ConfigBundle\AamantConfigBundle(),
...
];
Add routes
aamant_config_config:
prefix: /config
resource: "@AamantConfigBundle/Resources/config/routing.xml"
Use service
$service = $this->getContainer()->get('aamant_config.config');
Use add, get, has, delete
$config->set('version', '0.0.1')
// hidden attribute
$config->set('version', '0.0.1', true)
// get
$config->get('version')
// has
$config->has('version')
// delete
$config->delete('version')
Translate
use config
domain for translate name of the attribute
Manage attributes values
http://my-app/app_dev.php/config