aboutsummaryrefslogtreecommitdiffhomepage
path: root/plugins/demo_plugin/DemoPluginController.php
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/demo_plugin/DemoPluginController.php')
-rw-r--r--plugins/demo_plugin/DemoPluginController.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/plugins/demo_plugin/DemoPluginController.php b/plugins/demo_plugin/DemoPluginController.php
new file mode 100644
index 00000000..b8ace9c8
--- /dev/null
+++ b/plugins/demo_plugin/DemoPluginController.php
@@ -0,0 +1,24 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Shaarli\DemoPlugin;
6
7use Shaarli\Front\Controller\Admin\ShaarliAdminController;
8use Slim\Http\Request;
9use Slim\Http\Response;
10
11class DemoPluginController extends ShaarliAdminController
12{
13 public function index(Request $request, Response $response): Response
14 {
15 $this->assignView(
16 'content',
17 '<div class="center">' .
18 'This is a demo page. I have access to Shaarli container, so I\'m free to do whatever I want here.' .
19 '</div>'
20 );
21
22 return $response->write($this->render('pluginscontent'));
23 }
24}