diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-01-26 11:15:15 +0100 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-07-23 21:19:21 +0200 |
commit | 485b168a9677d160b0c0426e4f282b9bd0c632c1 (patch) | |
tree | c7c21ea01096bfe28622b3a23c5c76d1cb2435fa /application/container | |
parent | bee33239ed444f9724422fe5234cd79997500519 (diff) | |
download | Shaarli-485b168a9677d160b0c0426e4f282b9bd0c632c1.tar.gz Shaarli-485b168a9677d160b0c0426e4f282b9bd0c632c1.tar.zst Shaarli-485b168a9677d160b0c0426e4f282b9bd0c632c1.zip |
Process picwall rendering through Slim controller + UT
Diffstat (limited to 'application/container')
-rw-r--r-- | application/container/ContainerBuilder.php | 5 | ||||
-rw-r--r-- | application/container/ShaarliContainer.php | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/application/container/ContainerBuilder.php b/application/container/ContainerBuilder.php index e2c78ccc..99c12334 100644 --- a/application/container/ContainerBuilder.php +++ b/application/container/ContainerBuilder.php | |||
@@ -7,6 +7,7 @@ namespace Shaarli\Container; | |||
7 | use Shaarli\Bookmark\BookmarkFileService; | 7 | use Shaarli\Bookmark\BookmarkFileService; |
8 | use Shaarli\Bookmark\BookmarkServiceInterface; | 8 | use Shaarli\Bookmark\BookmarkServiceInterface; |
9 | use Shaarli\Config\ConfigManager; | 9 | use Shaarli\Config\ConfigManager; |
10 | use Shaarli\Formatter\FormatterFactory; | ||
10 | use Shaarli\History; | 11 | use Shaarli\History; |
11 | use Shaarli\Plugin\PluginManager; | 12 | use Shaarli\Plugin\PluginManager; |
12 | use Shaarli\Render\PageBuilder; | 13 | use Shaarli\Render\PageBuilder; |
@@ -76,6 +77,10 @@ class ContainerBuilder | |||
76 | return new PluginManager($container->conf); | 77 | return new PluginManager($container->conf); |
77 | }; | 78 | }; |
78 | 79 | ||
80 | $container['formatterFactory'] = function (ShaarliContainer $container): FormatterFactory { | ||
81 | return new FormatterFactory($container->conf, $container->loginManager->isLoggedIn()); | ||
82 | }; | ||
83 | |||
79 | return $container; | 84 | return $container; |
80 | } | 85 | } |
81 | } | 86 | } |
diff --git a/application/container/ShaarliContainer.php b/application/container/ShaarliContainer.php index 3fa9116e..fdf2f77f 100644 --- a/application/container/ShaarliContainer.php +++ b/application/container/ShaarliContainer.php | |||
@@ -6,6 +6,7 @@ namespace Shaarli\Container; | |||
6 | 6 | ||
7 | use Shaarli\Bookmark\BookmarkServiceInterface; | 7 | use Shaarli\Bookmark\BookmarkServiceInterface; |
8 | use Shaarli\Config\ConfigManager; | 8 | use Shaarli\Config\ConfigManager; |
9 | use Shaarli\Formatter\FormatterFactory; | ||
9 | use Shaarli\History; | 10 | use Shaarli\History; |
10 | use Shaarli\Plugin\PluginManager; | 11 | use Shaarli\Plugin\PluginManager; |
11 | use Shaarli\Render\PageBuilder; | 12 | use Shaarli\Render\PageBuilder; |
@@ -23,6 +24,7 @@ use Slim\Container; | |||
23 | * @property BookmarkServiceInterface $bookmarkService | 24 | * @property BookmarkServiceInterface $bookmarkService |
24 | * @property PageBuilder $pageBuilder | 25 | * @property PageBuilder $pageBuilder |
25 | * @property PluginManager $pluginManager | 26 | * @property PluginManager $pluginManager |
27 | * @property FormatterFactory $formatterFactory | ||
26 | */ | 28 | */ |
27 | class ShaarliContainer extends Container | 29 | class ShaarliContainer extends Container |
28 | { | 30 | { |