aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor/TagCloudController.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-07-26 14:43:10 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-26 14:43:10 +0200
commit9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9 (patch)
tree9bfc3c9b185eb0c185d23146d44d42dd6685a4da /application/front/controller/visitor/TagCloudController.php
parentbc583903adfd768f115fae438e4d9ed1043682d9 (diff)
downloadShaarli-9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9.tar.gz
Shaarli-9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9.tar.zst
Shaarli-9fbc42294e7667c5ef19cafa0d1fcfbc1c0f36a9.zip
New basePath: fix officiel plugin paths and vintage template
Diffstat (limited to 'application/front/controller/visitor/TagCloudController.php')
-rw-r--r--application/front/controller/visitor/TagCloudController.php24
1 files changed, 3 insertions, 21 deletions
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
71 'search_tags' => $searchTags, 71 'search_tags' => $searchTags,
72 'tags' => $tags, 72 'tags' => $tags,
73 ]; 73 ];
74 $data = $this->executeHooks('tag' . $type, $data); 74 $this->executePageHooks('render_tag' . $type, $data, 'tag.' . $type);
75 foreach ($data as $key => $value) { 75 $this->assignAllView($data);
76 $this->assignView($key, $value);
77 }
78 76
79 $searchTags = !empty($searchTags) ? $searchTags .' - ' : ''; 77 $searchTags = !empty($searchTags) ? $searchTags .' - ' : '';
80 $this->assignView( 78 $this->assignView(
@@ -82,7 +80,7 @@ class TagCloudController extends ShaarliVisitorController
82 $searchTags . t('Tag '. $type) .' - '. $this->container->conf->get('general.title', 'Shaarli') 80 $searchTags . t('Tag '. $type) .' - '. $this->container->conf->get('general.title', 'Shaarli')
83 ); 81 );
84 82
85 return $response->write($this->render('tag.'. $type)); 83 return $response->write($this->render('tag.' . $type));
86 } 84 }
87 85
88 /** 86 /**
@@ -112,20 +110,4 @@ class TagCloudController extends ShaarliVisitorController
112 110
113 return $tagList; 111 return $tagList;
114 } 112 }
115
116 /**
117 * @param mixed[] $data Template data
118 *
119 * @return mixed[] Template data after active plugins hook execution.
120 */
121 protected function executeHooks(string $template, array $data): array
122 {
123 $this->container->pluginManager->executeHooks(
124 'render_'. $template,
125 $data,
126 ['loggedin' => $this->container->loginManager->isLoggedIn()]
127 );
128
129 return $data;
130 }
131} 113}