Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ecedi/vars-bundle
A configuration as Entity small bundle
https://github.com/ecedi/vars-bundle
drupal ecedi php wordpress
Last synced: 3 days ago
JSON representation
A configuration as Entity small bundle
- Host: GitHub
- URL: https://github.com/ecedi/vars-bundle
- Owner: ecedi
- License: mit
- Created: 2014-09-04T14:26:03.000Z (over 10 years ago)
- Default Branch: devel
- Last Pushed: 2014-09-10T13:37:49.000Z (over 10 years ago)
- Last Synced: 2024-11-08T23:37:54.103Z (about 2 months ago)
- Topics: drupal, ecedi, php, wordpress
- Language: PHP
- Homepage: https://www.ecedi.fr
- Size: 152 KB
- Stars: 1
- Watchers: 12
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ecedi/vars-bundle by [Agence Ecedi](http://ecedi.fr)
this is a simple bundle with no UI, (API only) that replicate CMS like Drupal or Wordpress capacity to store configuration in Database.
## installation
### edit your composer.json file and add
```json
{
"require": {
"ecedi/vars-bundle": "dev-master",
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/ecedi/vars-bundle"
}
]
}
```### Add VarsBundle to your application kernel
```php
// app/AppKernel.php
public function registerBundles()
{
return array(
// ...
new Ecedi\VarsBundle\EcediVarsBundle(),
// ...
);
}
```### update your schema
```
app/console doctrine:schema:update --force
```## Usage
```php
$vm = $container->get('ecedi.vars.variable_manager'):
$config = $vm->get('my.parameter', 'default_value');
$vm->set('my.parameter', 'value');
```