From 1d121938f643737ca9de76286eef164c67f69482 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sun, 7 May 2023 10:04:13 +0200 Subject: Create examples --- Readme.md | 5 +++++ examples/plugin-simple/content/config/config.yaml | 9 +++++++++ .../plugin-simple/content/simple-form/fields/_fields.yaml | 9 +++++++++ examples/plugin-simple/plugins/SimplePlugin/Plugin.php | 14 ++++++++++++++ 4 files changed, 37 insertions(+) create mode 100644 examples/plugin-simple/content/config/config.yaml create mode 100644 examples/plugin-simple/content/simple-form/fields/_fields.yaml create mode 100644 examples/plugin-simple/plugins/SimplePlugin/Plugin.php diff --git a/Readme.md b/Readme.md index fe7b71f..bd67538 100644 --- a/Readme.md +++ b/Readme.md @@ -125,3 +125,8 @@ mkdir plugins docker-compose up -d ``` + + +## Examples + +Set `contentFolderPath` in root `config.yaml` to `./examples/$example/content`, `pluginsFolderPath` to `./examples/$example/plugins` and run the app. diff --git a/examples/plugin-simple/content/config/config.yaml b/examples/plugin-simple/content/config/config.yaml new file mode 100644 index 0000000..3d4f4c1 --- /dev/null +++ b/examples/plugin-simple/content/config/config.yaml @@ -0,0 +1,9 @@ +app: + title: Plugin Simple + +api: + keys: + - 1234 + cors: + origins: + - http://localhost:8081 diff --git a/examples/plugin-simple/content/simple-form/fields/_fields.yaml b/examples/plugin-simple/content/simple-form/fields/_fields.yaml new file mode 100644 index 0000000..8a0336e --- /dev/null +++ b/examples/plugin-simple/content/simple-form/fields/_fields.yaml @@ -0,0 +1,9 @@ +username: + type: text + name: username + required: true + +password: + type: password + name: password + required: true diff --git a/examples/plugin-simple/plugins/SimplePlugin/Plugin.php b/examples/plugin-simple/plugins/SimplePlugin/Plugin.php new file mode 100644 index 0000000..b59e492 --- /dev/null +++ b/examples/plugin-simple/plugins/SimplePlugin/Plugin.php @@ -0,0 +1,14 @@ +"; + var_dump($_ENV); + } + } +} -- cgit v1.2.3