3 declare(strict_types
=1);
5 namespace Shaarli\Front\Controller\Admin
;
7 use Shaarli\Render\TemplatePage
;
9 use Slim\Http\Response
;
12 * Class ToolsController
14 * Slim controller used to display the tools page.
16 class ToolsController
extends ShaarliAdminController
18 public function index(Request
$request, Response
$response): Response
21 'pageabsaddr' => index_url($this->container
->environment
),
22 'sslenabled' => is_https($this->container
->environment
),
25 $data = $this->executeHooks($data);
27 foreach ($data as $key => $value) {
28 $this->assignView($key, $value);
31 $this->assignView('pagetitle', t('Tools') .' - '. $this->container
->conf
->get('general.title', 'Shaarli'));
33 return $response->write($this->render(TemplatePage
::TOOLS
));
37 * @param mixed[] $data Variables passed to the template engine
39 * @return mixed[] Template data after active plugins render_picwall hook execution.
41 protected function executeHooks(array $data): array
43 $this->container
->pluginManager
->executeHooks(