2026-03-18 22:20:54 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Module\AddressBook;
|
|
|
|
|
|
|
|
|
|
use MintyPHP\App\AppContainer;
|
|
|
|
|
use MintyPHP\App\Container\ContainerRegistrar;
|
|
|
|
|
use MintyPHP\Module\AddressBook\Service\AddressBookService;
|
2026-03-26 12:47:24 +01:00
|
|
|
use MintyPHP\Service\Access\PermissionService;
|
2026-03-26 12:24:06 +01:00
|
|
|
use MintyPHP\Service\Access\RoleService;
|
2026-04-22 19:32:14 +02:00
|
|
|
use MintyPHP\Service\CustomField\CustomFieldRepositoryFactory;
|
2026-03-26 12:24:06 +01:00
|
|
|
use MintyPHP\Service\CustomField\UserCustomFieldValueService;
|
|
|
|
|
use MintyPHP\Service\Org\DepartmentService;
|
2026-03-18 22:20:54 +01:00
|
|
|
use MintyPHP\Service\Tenant\TenantScopeService;
|
2026-03-26 12:24:06 +01:00
|
|
|
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;
|
2026-03-18 22:20:54 +01:00
|
|
|
|
|
|
|
|
final class AddressBookContainerRegistrar implements ContainerRegistrar
|
|
|
|
|
{
|
|
|
|
|
public function register(AppContainer $container): void
|
|
|
|
|
{
|
2026-03-26 12:47:24 +01:00
|
|
|
$container->set(AddressBookAuthorizationPolicy::class, static fn (AppContainer $c): AddressBookAuthorizationPolicy => new AddressBookAuthorizationPolicy(
|
|
|
|
|
$c->get(PermissionService::class)
|
|
|
|
|
));
|
|
|
|
|
|
2026-03-26 12:24:06 +01:00
|
|
|
$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),
|
2026-04-22 19:32:14 +02:00
|
|
|
$c->get(UserProfileViewService::class),
|
|
|
|
|
$c->get(CustomFieldRepositoryFactory::class)->createTenantCustomFieldOptionRepository()
|
2026-03-18 22:20:54 +01:00
|
|
|
));
|
|
|
|
|
}
|
|
|
|
|
}
|