Use new settings system to configure the instance Name and homepage banner

This commit is contained in:
Jan Böhmer 2024-05-20 21:14:32 +02:00
parent 26d83af298
commit 0772d85918
23 changed files with 299 additions and 230 deletions

View file

@ -7,6 +7,7 @@ use ApiPlatform\State\ProviderInterface;
use App\ApiResource\PartDBInfo;
use App\Services\Misc\GitVersionInfo;
use App\Services\System\BannerHelper;
use App\Settings\SystemSettings\CustomizationSettings;
use Shivas\VersioningBundle\Service\VersionManagerInterface;
class PartDBInfoProvider implements ProviderInterface
@ -14,12 +15,12 @@ class PartDBInfoProvider implements ProviderInterface
public function __construct(private readonly VersionManagerInterface $versionManager,
private readonly GitVersionInfo $gitVersionInfo,
private readonly string $partdb_title,
private readonly string $base_currency,
private readonly BannerHelper $bannerHelper,
private readonly string $default_uri,
private readonly string $global_timezone,
private readonly string $global_locale
private readonly string $global_locale,
private readonly CustomizationSettings $customizationSettings,
)
{
@ -31,7 +32,7 @@ class PartDBInfoProvider implements ProviderInterface
version: $this->versionManager->getVersion()->toString(),
git_branch: $this->gitVersionInfo->getGitBranchName(),
git_commit: $this->gitVersionInfo->getGitCommitHash(),
title: $this->partdb_title,
title: $this->customizationSettings->instanceName,
banner: $this->bannerHelper->getBanner(),
default_uri: $this->default_uri,
global_timezone: $this->global_timezone,