summaryrefslogtreecommitdiff
path: root/app/Statistics.php
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-01-30 20:42:10 +0000
committerGreg Roach <fisharebest@webtrees.net>2019-01-30 20:42:10 +0000
commitfd9aba47e25f4f9a92c7ac8580a56d6b89d1638f (patch)
tree9e3cc594924a14f35d76daa28e5bee1c4e78e865 /app/Statistics.php
parent6fd4f6e3d5a2c64c159e88e10883a1ccab4d4a42 (diff)
downloadwebtrees-fd9aba47e25f4f9a92c7ac8580a56d6b89d1638f.tar.gz
webtrees-fd9aba47e25f4f9a92c7ac8580a56d6b89d1638f.tar.bz2
webtrees-fd9aba47e25f4f9a92c7ac8580a56d6b89d1638f.zip
Dependency injection
Diffstat (limited to 'app/Statistics.php')
-rw-r--r--app/Statistics.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/Statistics.php b/app/Statistics.php
index e3cfaf022e..b599116410 100644
--- a/app/Statistics.php
+++ b/app/Statistics.php
@@ -211,7 +211,7 @@ class Statistics implements
$this->browserRepository = new BrowserRepository();
$this->hitCountRepository = new HitCountRepository($tree);
$this->latestUserRepository = new LatestUserRepository();
- $this->favoritesRepository = new FavoritesRepository($tree);
+ $this->favoritesRepository = new FavoritesRepository($tree, $module_service);
$this->newsRepository = new NewsRepository($tree);
$this->messageRepository = new MessageRepository();
$this->contactRepository = new ContactRepository($tree);
@@ -2589,7 +2589,8 @@ class Statistics implements
public function callBlock(string $block = '', ...$params): ?string
{
/** @var ModuleBlockInterface $module */
- $module = app(ModuleService::class)->findByComponent('block', $this->tree, Auth::user())
+ $module = $this->module_service
+ ->findByComponent('block', $this->tree, Auth::user())
->filter(function (ModuleInterface $module) use ($block): bool {
return $module->name() === $block && $module->name() !== 'html';
})