diff options
author | Daniel Weipert <code@drogueronin.de> | 2022-10-23 12:04:08 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2022-10-23 12:04:08 +0200 |
commit | 592d88077deae5f74fce452e0e256b430349a92b (patch) | |
tree | b1ccce19d5d5d36af3f7b8f2968ca33dd2aa8a34 | |
parent | 61a6af60577280a5914b07d48ee348a797c5b512 (diff) |
Adjust Readme
-rw-r--r-- | Readme.md | 52 |
1 files changed, 35 insertions, 17 deletions
@@ -8,12 +8,19 @@ Callable via REST-API ## Directory Structure -- $root - - repositories/ - - $group/ +- config.yaml (main config) +- $contentFolder/ - config/ - - config.toml - - templates/ + - $group/ +- $pluginsFolder/ + - $pluginName/ + - Plugin.php + +### config consists of + +- config/ + - config.yaml + - functions.php ### $group consists of @@ -25,31 +32,42 @@ Callable via REST-API - $form/ - config/ - - fields/ - - _fields.toml - - name.toml - - email.toml - - submissions/ + - entries/ - $year - $month + - $day + - \$year\$month\$day_\$hour\$minute_\$hash.yaml + - fields/ + - _fields.yaml + - email.yaml + - name.yaml ## config -`config.toml` with config values -overwritten by config.toml in $group/config/ -overwritten by config.toml in $form/config/ +adjust $contentFolder and $pluginsFolder path in main config.yaml -### config/templates +`config.yaml` with config values in $contentFolder/config/ +overwritten by config.yaml in $group/config/ +overwritten by config.yaml in $form/config/ -Templates to use when returning a pre-rendered HTML form +`functions.php` with custom code in $contentFolder/config/ +included if exists in subsequent config folders ## REST-API `localhost:3000/$group/$group/$form` -GET ...$form/fields +`GET` `...$form/fields` +`GET` `...$form/entries?dateFrom=$date` + +`POST` `...$form/validate` +`POST` `...$form/submit` + -POST ...$form +## Plugins +1. create `$pluginName` directory in $pluginsFolder +2. create `Plugin.php` with `FlatFileForms\Plugins\$pluginName` namespace and `Plugin` class +3. write code in `__construct` method |