Refactor helper drift in lib: centralize theme/translation and remove app() hotspots
This commit is contained in:
@@ -35,6 +35,24 @@ class UserSettingsGateway
|
||||
return $this->settingsAppGateway->getAppTheme();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, string>
|
||||
*/
|
||||
public function appThemes(): array
|
||||
{
|
||||
return $this->settingsAppGateway->listThemes();
|
||||
}
|
||||
|
||||
public function defaultTheme(): string
|
||||
{
|
||||
return $this->settingsAppGateway->resolveDefaultTheme();
|
||||
}
|
||||
|
||||
public function normalizeTheme(?string $theme): string
|
||||
{
|
||||
return $this->settingsAppGateway->normalizeTheme($theme);
|
||||
}
|
||||
|
||||
public function getUserInactivityDeactivateDays(): int
|
||||
{
|
||||
return $this->settingsUserLifecycleGateway->getUserInactivityDeactivateDays();
|
||||
|
||||
Reference in New Issue
Block a user