Files

40 lines
1.6 KiB
PHP
Raw Permalink Normal View History

<?php
namespace MintyPHP\Module\AddressBook;
use MintyPHP\App\AppContainer;
use MintyPHP\App\Container\ContainerRegistrar;
use MintyPHP\Module\AddressBook\Service\AddressBookService;
use MintyPHP\Service\Access\PermissionService;
use MintyPHP\Service\Access\RoleService;
use MintyPHP\Service\CustomField\CustomFieldRepositoryFactory;
use MintyPHP\Service\CustomField\UserCustomFieldValueService;
use MintyPHP\Service\Org\DepartmentService;
use MintyPHP\Service\Tenant\TenantScopeService;
use MintyPHP\Service\Tenant\TenantService;
use MintyPHP\Service\User\UserAccountService;
use MintyPHP\Service\User\UserAvatarService;
2026-04-22 15:49:10 +02:00
use MintyPHP\Service\User\UserProfileViewService;
final class AddressBookContainerRegistrar implements ContainerRegistrar
{
public function register(AppContainer $container): void
{
$container->set(AddressBookAuthorizationPolicy::class, static fn (AppContainer $c): AddressBookAuthorizationPolicy => new AddressBookAuthorizationPolicy(
$c->get(PermissionService::class)
));
$container->set(AddressBookService::class, static fn (AppContainer $c): AddressBookService => new AddressBookService(
$c->get(UserAccountService::class),
$c->get(TenantService::class),
$c->get(DepartmentService::class),
$c->get(RoleService::class),
$c->get(TenantScopeService::class),
$c->get(UserCustomFieldValueService::class),
2026-04-22 15:49:10 +02:00
$c->get(UserAvatarService::class),
$c->get(UserProfileViewService::class),
$c->get(CustomFieldRepositoryFactory::class)->createTenantCustomFieldOptionRepository()
));
}
}