aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front/controllers/ShaarliController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/front/controllers/ShaarliController.php')
-rw-r--r--application/front/controllers/ShaarliController.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/application/front/controllers/ShaarliController.php b/application/front/controllers/ShaarliController.php
index 99e66d53..2b828588 100644
--- a/application/front/controllers/ShaarliController.php
+++ b/application/front/controllers/ShaarliController.php
@@ -10,12 +10,12 @@ use Shaarli\Container\ShaarliContainer;
10abstract class ShaarliController 10abstract class ShaarliController
11{ 11{
12 /** @var ShaarliContainer */ 12 /** @var ShaarliContainer */
13 protected $ci; 13 protected $container;
14 14
15 /** @param ShaarliContainer $ci Slim container (extended for attribute completion). */ 15 /** @param ShaarliContainer $container Slim container (extended for attribute completion). */
16 public function __construct(ShaarliContainer $ci) 16 public function __construct(ShaarliContainer $container)
17 { 17 {
18 $this->ci = $ci; 18 $this->container = $container;
19 } 19 }
20 20
21 /** 21 /**
@@ -25,20 +25,20 @@ abstract class ShaarliController
25 */ 25 */
26 protected function assignView(string $name, $value): self 26 protected function assignView(string $name, $value): self
27 { 27 {
28 $this->ci->pageBuilder->assign($name, $value); 28 $this->container->pageBuilder->assign($name, $value);
29 29
30 return $this; 30 return $this;
31 } 31 }
32 32
33 protected function render(string $template): string 33 protected function render(string $template): string
34 { 34 {
35 $this->assignView('linkcount', $this->ci->bookmarkService->count(BookmarkFilter::$ALL)); 35 $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL));
36 $this->assignView('privateLinkcount', $this->ci->bookmarkService->count(BookmarkFilter::$PRIVATE)); 36 $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
37 $this->assignView('plugin_errors', $this->ci->pluginManager->getErrors()); 37 $this->assignView('plugin_errors', $this->container->pluginManager->getErrors());
38 38
39 $this->executeDefaultHooks($template); 39 $this->executeDefaultHooks($template);
40 40
41 return $this->ci->pageBuilder->render($template); 41 return $this->container->pageBuilder->render($template);
42 } 42 }
43 43
44 /** 44 /**
@@ -55,12 +55,12 @@ abstract class ShaarliController
55 55
56 foreach ($common_hooks as $name) { 56 foreach ($common_hooks as $name) {
57 $plugin_data = []; 57 $plugin_data = [];
58 $this->ci->pluginManager->executeHooks( 58 $this->container->pluginManager->executeHooks(
59 'render_' . $name, 59 'render_' . $name,
60 $plugin_data, 60 $plugin_data,
61 [ 61 [
62 'target' => $template, 62 'target' => $template,
63 'loggedin' => $this->ci->loginManager->isLoggedIn() 63 'loggedin' => $this->container->loginManager->isLoggedIn()
64 ] 64 ]
65 ); 65 );
66 $this->assignView('plugins_' . $name, $plugin_data); 66 $this->assignView('plugins_' . $name, $plugin_data);