diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-27 19:23:45 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-11-15 12:41:43 +0100 |
commit | a6e9c08499f9f79dad88cb3ae9eacda0e0c34c96 (patch) | |
tree | 41f70d7dc478e70a4a3ce4a578839316f5578765 /tests/plugins/test_route_invalid | |
parent | 6f9e0609f4c118142504234ebcc7d93456b5e588 (diff) | |
download | Shaarli-a6e9c08499f9f79dad88cb3ae9eacda0e0c34c96.tar.gz Shaarli-a6e9c08499f9f79dad88cb3ae9eacda0e0c34c96.tar.zst Shaarli-a6e9c08499f9f79dad88cb3ae9eacda0e0c34c96.zip |
Plugin system: allow plugins to provide custom routes
- each route will be prefixed by `/plugin/<plugin_name>`
- add a new template for plugins rendering
- add a live example in the demo_plugin
Check out the "Plugin System" documentation for more detail.
Related to #143
Diffstat (limited to 'tests/plugins/test_route_invalid')
-rw-r--r-- | tests/plugins/test_route_invalid/test_route_invalid.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/plugins/test_route_invalid/test_route_invalid.php b/tests/plugins/test_route_invalid/test_route_invalid.php new file mode 100644 index 00000000..0c5a5101 --- /dev/null +++ b/tests/plugins/test_route_invalid/test_route_invalid.php | |||
@@ -0,0 +1,12 @@ | |||
1 | <?php | ||
2 | |||
3 | function test_route_invalid_register_routes(): array | ||
4 | { | ||
5 | return [ | ||
6 | [ | ||
7 | 'method' => 'GET', | ||
8 | 'route' => 'not a route', | ||
9 | 'callable' => 'getFunction', | ||
10 | ], | ||
11 | ]; | ||
12 | } | ||