]> git.immae.eu Git - github/shaarli/Shaarli.git/blob - plugins/demo_plugin/DemoPluginController.php
Plugin system: allow plugins to provide custom routes
[github/shaarli/Shaarli.git] / plugins / demo_plugin / DemoPluginController.php
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Shaarli\DemoPlugin;
6
7 use Shaarli\Front\Controller\Admin\ShaarliAdminController;
8 use Slim\Http\Request;
9 use Slim\Http\Response;
10
11 class 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 }