X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=application%2Ffront%2Fcontroller%2Fadmin%2FToolsController.php;h=560e5e3e76deaa0491241e105e8b10584cce1ff5;hb=53054b2bf6a919fd4ff9b44b6ad1986f21f488b6;hp=66db5ad9f526d51588a200157093b75ed9cdf126;hpb=ba43064ddb7771fc97df135a32f9b0d5e373dd36;p=github%2Fshaarli%2FShaarli.git diff --git a/application/front/controller/admin/ToolsController.php b/application/front/controller/admin/ToolsController.php index 66db5ad9..560e5e3e 100644 --- a/application/front/controller/admin/ToolsController.php +++ b/application/front/controller/admin/ToolsController.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace Shaarli\Front\Controller\Admin; +use Shaarli\Render\TemplatePage; use Slim\Http\Request; use Slim\Http\Response; @@ -21,29 +22,14 @@ class ToolsController extends ShaarliAdminController 'sslenabled' => is_https($this->container->environment), ]; - $this->executeHooks($data); + $this->executePageHooks('render_tools', $data, TemplatePage::TOOLS); foreach ($data as $key => $value) { $this->assignView($key, $value); } - $this->assignView('pagetitle', t('Tools') .' - '. $this->container->conf->get('general.title', 'Shaarli')); + $this->assignView('pagetitle', t('Tools') . ' - ' . $this->container->conf->get('general.title', 'Shaarli')); - return $response->write($this->render('tools')); - } - - /** - * @param mixed[] $data Variables passed to the template engine - * - * @return mixed[] Template data after active plugins render_picwall hook execution. - */ - protected function executeHooks(array $data): array - { - $this->container->pluginManager->executeHooks( - 'render_tools', - $data - ); - - return $data; + return $response->write($this->render(TemplatePage::TOOLS)); } }