bitscout / simple-config
A simple way to configure a few global variables in SonataAdmin
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: ^7.2
- symfony/config: ~3.3|~4.0
- symfony/dependency-injection: ~3.4.10|^4.0.10
- symfony/http-kernel: ~3.3|~4.0
Requires (Dev)
- phpunit/phpunit: ^9.4
- sonata-project/admin-bundle: ^3.80
This package is auto-updated.
Last update: 2025-03-16 08:47:58 UTC
README
A simple way to configure a few global variables in SonataAdmin. Define them in YAML, let users edit them in the admin interface.
Status: Work in progress, not yet implemented
Installation
Simply composer require bitscout/simple-config
and then add this line to your bundles.php
:
Bitscout\SimpleConfig\BitscoutSimpleConfigBundle::class => ['all' => true],
Configuration
Create the file config/packages/bitscout_simple_config.yaml
:
bitscout_simple_config:
fields:
foo:
label: Fubar
type: int
default: bar
show: true # optional, default true
This immediately will provide you with the environment variable SIMPLE_CONFIG_FOO
with the value "bar"
.
In your sonata_admin.yaml
, add a menu entry to the route admin_app_bitscout_simple_config_list
.
Administration
TODO
Add Sonata admin (list/edit) to set a value in the database, load that value to replace the default.