2026-02-23 12:58:19 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace MintyPHP\Service\Directory;
|
|
|
|
|
|
2026-03-19 08:23:14 +01:00
|
|
|
use MintyPHP\Service\Settings\SettingsAppGateway;
|
2026-03-06 00:44:52 +01:00
|
|
|
use MintyPHP\Service\Settings\SettingsDefaultsGateway;
|
2026-02-23 12:58:19 +01:00
|
|
|
|
|
|
|
|
class DirectorySettingsGateway
|
|
|
|
|
{
|
2026-03-19 08:23:14 +01:00
|
|
|
public function __construct(
|
|
|
|
|
private readonly SettingsDefaultsGateway $settingsDefaultsGateway,
|
|
|
|
|
private readonly SettingsAppGateway $settingsAppGateway
|
|
|
|
|
)
|
2026-02-23 12:58:19 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setDefaultTenantId(?int $tenantId): void
|
|
|
|
|
{
|
2026-03-06 00:44:52 +01:00
|
|
|
$this->settingsDefaultsGateway->setDefaultTenantId($tenantId);
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setDefaultDepartmentId(?int $departmentId): void
|
|
|
|
|
{
|
2026-03-06 00:44:52 +01:00
|
|
|
$this->settingsDefaultsGateway->setDefaultDepartmentId($departmentId);
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function setDefaultRoleId(?int $roleId): void
|
|
|
|
|
{
|
2026-03-06 00:44:52 +01:00
|
|
|
$this->settingsDefaultsGateway->setDefaultRoleId($roleId);
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|
2026-03-19 08:23:14 +01:00
|
|
|
|
|
|
|
|
public function isAllowedTheme(string $theme): bool
|
|
|
|
|
{
|
|
|
|
|
return $this->settingsAppGateway->isAllowedTheme($theme);
|
|
|
|
|
}
|
2026-02-23 12:58:19 +01:00
|
|
|
}
|