aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor/PictureWallController.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/PictureWallController.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/PictureWallController.php')
-rw-r--r--application/front/controller/visitor/PictureWallController.php23
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}