summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin-simple/content/config/config.yaml9
-rw-r--r--examples/plugin-simple/content/simple-form/fields/_fields.yaml9
-rw-r--r--examples/plugin-simple/plugins/SimplePlugin/Plugin.php14
3 files changed, 32 insertions, 0 deletions
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 @@
+<?php
+
+namespace FlatFileForms\Plugins\SimplePlugin;
+
+class Plugin
+{
+ public function __construct()
+ {
+ if (rand(1, 2) === 2) {
+ echo "Simple Plugin output: <pre>";
+ var_dump($_ENV);
+ }
+ }
+}