aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controller/visitor/FeedController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/controller/visitor/FeedController.php')
-rw-r--r--application/front/controller/visitor/FeedController.php21
1 files changed, 1 insertions, 20 deletions
diff --git a/application/front/controller/visitor/FeedController.php b/application/front/controller/visitor/FeedController.php
index f76f55fd..da2848c2 100644
--- a/application/front/controller/visitor/FeedController.php
+++ b/application/front/controller/visitor/FeedController.php
@@ -46,7 +46,7 @@ class FeedController extends ShaarliVisitorController
46 46
47 $data = $this->container->feedBuilder->buildData($feedType, $request->getParams()); 47 $data = $this->container->feedBuilder->buildData($feedType, $request->getParams());
48 48
49 $data = $this->executeHooks($data, $feedType); 49 $this->executePageHooks('render_feed', $data, $feedType);
50 $this->assignAllView($data); 50 $this->assignAllView($data);
51 51
52 $content = $this->render('feed.'. $feedType); 52 $content = $this->render('feed.'. $feedType);
@@ -55,23 +55,4 @@ class FeedController extends ShaarliVisitorController
55 55
56 return $response->write($content); 56 return $response->write($content);
57 } 57 }
58
59 /**
60 * @param mixed[] $data Template data
61 *
62 * @return mixed[] Template data after active plugins hook execution.
63 */
64 protected function executeHooks(array $data, string $feedType): array
65 {
66 $this->container->pluginManager->executeHooks(
67 'render_feed',
68 $data,
69 [
70 'loggedin' => $this->container->loginManager->isLoggedIn(),
71 'target' => $feedType,
72 ]
73 );
74
75 return $data;
76 }
77} 58}