The EuroCMS Settings Module
| author | version | date |
|---|---|---|
| Imri Paloja | draft | 24-07-2022 |
The Setting modules allows components to store key value data in the database, securely.
The settings class allows to SET and GET values. It will auto detect the name and component type, and use them as a parameter for the DB query.
Only the Files module is allowed to access Files saved data.
Contemplate
- Make this a generic named key value, with type and such?
The variables in EuroEditor, are saved as in object in the database, with the first value hard set.
Make this the "Value" module. So that every component can save any and all things in here. Not just settings items?
DB Structure
| setting_id | domain_id | user_id | group_id | description | type | component | component_name | key | value | user_lock | status |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | settings | modules | Files | STORAGE_HANDLER | Local | enabled | |||
| 2 | 1 | 1 | settings | modules | EuroEditor | FORMAT | markdown | enabled | |||
| 3 | 1 | 1 | settings | function | IPInfo | API_KEY | zxcvasdfqw | enabled | |||
| 4 | 1 | 1 | settings | function | HetrixTools | API_KEY | qwerty | enabled | |||
| 5 | 1 | 1 | settings | libraries | exiftool | INSTALLED_BINARY | true | enabled | |||
| 6 | 1 | 1 | settings | core | Search | ENGINE | Solr | enabled | |||
| 7 | 1 | 1 | settings | themes | Skeleton | SKELETON_VERSION | 2.0.4 | enabled | |||
| 8 | 1 | 1 | settings | widgets | NewUbuntuRelease | LATEST_VERSION | 22.04 | enabled | |||
| 9 | 1 | 1 | variable | modules | EuroEditor | UBUNTU_LTS_VERSION | 22.04 | ||||
| 10 | 1 | 1 | modules | Forms | INPUTS | ||||||
| 11 | 1 | 1 | modules | api | DEFAULT_OUTPUT | yaml | |||||
| 12 | 1 | 1 | modules | api | YAML_REGEX | {}:|>?< | |||||
| 13 | 1 | 1 |
Permissions
| settings_add | The ability to add a new settings data | |
| setting_modify | The ability to modify existing settings data | |
| settings_delete | The ability to delete existing settings data |