diff options
Diffstat (limited to 'application/front/controller/visitor/PictureWallController.php')
-rw-r--r-- | application/front/controller/visitor/PictureWallController.php | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/application/front/controller/visitor/PictureWallController.php b/application/front/controller/visitor/PictureWallController.php index 5ef2cb17..3c57f8dd 100644 --- a/application/front/controller/visitor/PictureWallController.php +++ b/application/front/controller/visitor/PictureWallController.php | |||
@@ -42,30 +42,13 @@ class PictureWallController extends ShaarliVisitorController | |||
42 | } | 42 | } |
43 | } | 43 | } |
44 | 44 | ||
45 | $data = $this->executeHooks($linksToDisplay); | 45 | $data = ['linksToDisplay' => $linksToDisplay]; |
46 | $this->executePageHooks('render_picwall', $data, TemplatePage::PICTURE_WALL); | ||
47 | |||
46 | foreach ($data as $key => $value) { | 48 | foreach ($data as $key => $value) { |
47 | $this->assignView($key, $value); | 49 | $this->assignView($key, $value); |
48 | } | 50 | } |
49 | 51 | ||
50 | return $response->write($this->render(TemplatePage::PICTURE_WALL)); | 52 | return $response->write($this->render(TemplatePage::PICTURE_WALL)); |
51 | } | 53 | } |
52 | |||
53 | /** | ||
54 | * @param mixed[] $linksToDisplay List of formatted bookmarks | ||
55 | * | ||
56 | * @return mixed[] Template data after active plugins render_picwall hook execution. | ||
57 | */ | ||
58 | protected function executeHooks(array $linksToDisplay): array | ||
59 | { | ||
60 | $data = [ | ||
61 | 'linksToDisplay' => $linksToDisplay, | ||
62 | ]; | ||
63 | $this->container->pluginManager->executeHooks( | ||
64 | 'render_picwall', | ||
65 | $data, | ||
66 | ['loggedin' => $this->container->loginManager->isLoggedIn()] | ||
67 | ); | ||
68 | |||
69 | return $data; | ||
70 | } | ||
71 | } | 54 | } |