Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pointybeard/settings
A Symphony CMS Extension (https://www.getsymphony.com/) for storing and retrieving key/value settings in a simple and clean way
https://github.com/pointybeard/settings
Last synced: 9 days ago
JSON representation
A Symphony CMS Extension (https://www.getsymphony.com/) for storing and retrieving key/value settings in a simple and clean way
- Host: GitHub
- URL: https://github.com/pointybeard/settings
- Owner: pointybeard
- License: other
- Created: 2020-03-11T00:05:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-03-29T05:02:30.000Z (over 4 years ago)
- Last Synced: 2024-10-12T06:21:06.554Z (about 1 month ago)
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
README
# Settings Extension for Symphony CMS
- Version: 0.1.0
- Date: March 11 2020
- [Release notes](https://github.com/pointybeard/settings/blob/master/CHANGELOG.md)
- [GitHub repository](https://github.com/pointybeard/settings)A [Symphony CMS Extension](https://www.getsymphony.com/) for storing and retrieving key/value settings in a simple and clean way.
## Installation
This is an extension for Symphony CMS. Add it to your `/extensions` folder in your Symphony CMS installation, run `composer update` to install required packages and then enable it though the interface.
### Requirements
This extension requires PHP 7.3 or greater.
This extension depends on the following Composer libraries:
- [PHP Helpers](https://github.com/pointybeard/helpers)
- [Symphony CMS: Section Builder](https://github.com/pointybeard/symphony-section-builder)
- [Symphony CMS: Section Class Mapper](https://github.com/pointybeard/symphony-classmapper)Run `composer update` on the `extension/settings` directory to install these.
## Usage
Here is an example of how to use this extension in your code.
### Saving Settings
There are 2 ways to save settings. By browsing to "System" > "Settings" in the admin and adding/editing/deleting settings or in code by using the Settings model.
```php
name("mysetting")
->value("one two three")
->group("myapp")
->save()
;
```### Retriving Settings
The main use of this extension is going to be to recall settings when needed. There are 2 important methods to know about:
`Models\Setting::fetchByGroup()` and `Models\Setting::loadFromNameFilterByGroup()`
```php
find("mysetting");
```## Support
If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/pointybeard/settings/issues),
or better yet, fork the library and submit a pull request.## Contributing
We encourage you to contribute to this project. Please check out the [Contributing documentation](https://github.com/pointybeard/settings/blob/master/CONTRIBUTING.md) for guidelines about how to get involved.
## License
"Settings Extension for Symphony CMS" is released under the [MIT License](http://www.opensource.org/licenses/MIT).