diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-07-06 08:04:35 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 1a8ac737e52cb25a5c346232ee398f5908cee7d7 (patch) | |
tree | 31954c4e106b5743e2005d72c2d548a0be8d6dce /application/container/ContainerBuilder.php | |
parent | 6132d64748dfc6806ed25f71d2e078a5ed29d071 (diff) | |
download | Shaarli-1a8ac737e52cb25a5c346232ee398f5908cee7d7.tar.gz Shaarli-1a8ac737e52cb25a5c346232ee398f5908cee7d7.tar.zst Shaarli-1a8ac737e52cb25a5c346232ee398f5908cee7d7.zip |
Process main page (linklist) through Slim controller
Including a bunch of improvements on the container,
and helper used across new controllers.
Diffstat (limited to 'application/container/ContainerBuilder.php')
-rw-r--r-- | application/container/ContainerBuilder.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php index ba91fe8b..ccb87c3a 100644 --- a/application/container/ContainerBuilder.php +++ b/application/container/ContainerBuilder.php | |||
@@ -18,6 +18,8 @@ use Shaarli\Render\PageCacheManager; | |||
18 | use Shaarli\Security\LoginManager; | 18 | use Shaarli\Security\LoginManager; |
19 | use Shaarli\Security\SessionManager; | 19 | use Shaarli\Security\SessionManager; |
20 | use Shaarli\Thumbnailer; | 20 | use Shaarli\Thumbnailer; |
21 | use Shaarli\Updater\Updater; | ||
22 | use Shaarli\Updater\UpdaterUtils; | ||
21 | 23 | ||
22 | /** | 24 | /** |
23 | * Class ContainerBuilder | 25 | * Class ContainerBuilder |
@@ -128,6 +130,15 @@ class ContainerBuilder | |||
128 | return new NetscapeBookmarkUtils($container->bookmarkService, $container->conf, $container->history); | 130 | return new NetscapeBookmarkUtils($container->bookmarkService, $container->conf, $container->history); |
129 | }; | 131 | }; |
130 | 132 | ||
133 | $container['updater'] = function (ShaarliContainer $container): Updater { | ||
134 | return new Updater( | ||
135 | UpdaterUtils::read_updates_file($container->conf->get('resource.updates')), | ||
136 | $container->bookmarkService, | ||
137 | $container->conf, | ||
138 | $container->loginManager->isLoggedIn() | ||
139 | ); | ||
140 | }; | ||
141 | |||
131 | return $container; | 142 | return $container; |
132 | } | 143 | } |
133 | } | 144 | } |