Accounts: Fetch list of all accounts (optionally filtered by domain)

This commit is contained in:
Lexi / Zoe 2021-07-30 03:46:43 +02:00
parent 279f4492e8
commit 985f46c652
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
6 changed files with 145 additions and 9 deletions

View file

@ -9,6 +9,7 @@ use MailAccountAdmin\Frontend\Accounts\AccountController;
use MailAccountAdmin\Frontend\Domains\DomainController;
use MailAccountAdmin\Frontend\Login\LoginController;
use MailAccountAdmin\Frontend\Dashboard\DashboardController;
use MailAccountAdmin\Repositories\AccountRepository;
use MailAccountAdmin\Repositories\AdminUserRepository;
use MailAccountAdmin\Repositories\DomainRepository;
use PDO;
@ -64,6 +65,11 @@ class Dependencies
$c->get(self::DATABASE),
);
});
$container->set(AccountRepository::class, function (ContainerInterface $c) {
return new AccountRepository(
$c->get(self::DATABASE),
);
});
// Helper classes
$container->set(UserHelper::class, function (ContainerInterface $c) {
@ -97,6 +103,7 @@ class Dependencies
return new AccountController(
$c->get(self::TWIG),
$c->get(UserHelper::class),
$c->get(AccountRepository::class),
);
});