diff options
Diffstat (limited to 'application/front/controller/visitor/TagCloudController.php')
-rw-r--r-- | application/front/controller/visitor/TagCloudController.php | 24 |
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 | } |