From 9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Sun, 26 Jul 2020 14:43:10 +0200 Subject: New basePath: fix officiel plugin paths and vintage template --- .../controller/visitor/TagCloudController.php | 24 +++------------------- 1 file changed, 3 insertions(+), 21 deletions(-) (limited to 'application/front/controller/visitor/TagCloudController.php') diff --git a/application/front/controller/visitor/TagCloudController.php b/application/front/controller/visitor/TagCloudController.php index 15b6d7b7..f9c529bc 100644 --- a/application/front/controller/visitor/TagCloudController.php +++ b/application/front/controller/visitor/TagCloudController.php @@ -71,10 +71,8 @@ class TagCloudController extends ShaarliVisitorController 'search_tags' => $searchTags, 'tags' => $tags, ]; - $data = $this->executeHooks('tag' . $type, $data); - foreach ($data as $key => $value) { - $this->assignView($key, $value); - } + $this->executePageHooks('render_tag' . $type, $data, 'tag.' . $type); + $this->assignAllView($data); $searchTags = !empty($searchTags) ? $searchTags .' - ' : ''; $this->assignView( @@ -82,7 +80,7 @@ class TagCloudController extends ShaarliVisitorController $searchTags . t('Tag '. $type) .' - '. $this->container->conf->get('general.title', 'Shaarli') ); - return $response->write($this->render('tag.'. $type)); + return $response->write($this->render('tag.' . $type)); } /** @@ -112,20 +110,4 @@ class TagCloudController extends ShaarliVisitorController return $tagList; } - - /** - * @param mixed[] $data Template data - * - * @return mixed[] Template data after active plugins hook execution. - */ - protected function executeHooks(string $template, array $data): array - { - $this->container->pluginManager->executeHooks( - 'render_'. $template, - $data, - ['loggedin' => $this->container->loginManager->isLoggedIn()] - ); - - return $data; - } } -- cgit v1.2.3