aboutsummaryrefslogtreecommitdiffstats
path: root/apps/theming/lib/Service/ThemesService.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/theming/lib/Service/ThemesService.php')
-rw-r--r--apps/theming/lib/Service/ThemesService.php46
1 files changed, 23 insertions, 23 deletions
diff --git a/apps/theming/lib/Service/ThemesService.php b/apps/theming/lib/Service/ThemesService.php
index eabd903734a..0d252e96431 100644
--- a/apps/theming/lib/Service/ThemesService.php
+++ b/apps/theming/lib/Service/ThemesService.php
@@ -42,30 +42,30 @@ class ThemesService {
private array $themesProviders;
public function __construct(IUserSession $userSession,
- IConfig $config,
- DefaultTheme $defaultTheme,
- LightTheme $lightTheme,
- DarkTheme $darkTheme,
- HighContrastTheme $highContrastTheme,
- DarkHighContrastTheme $darkHighContrastTheme,
- DyslexiaFont $dyslexiaFont) {
+ IConfig $config,
+ DefaultTheme $defaultTheme,
+ LightTheme $lightTheme,
+ DarkTheme $darkTheme,
+ HighContrastTheme $highContrastTheme,
+ DarkHighContrastTheme $darkHighContrastTheme,
+ DyslexiaFont $dyslexiaFont) {
$this->userSession = $userSession;
$this->config = $config;
// Register themes
$this->themesProviders = [
- $defaultTheme->getId() => $defaultTheme,
- $lightTheme->getId() => $lightTheme,
- $darkTheme->getId() => $darkTheme,
- $highContrastTheme->getId() => $highContrastTheme,
- $darkHighContrastTheme->getId() => $darkHighContrastTheme,
- $dyslexiaFont->getId() => $dyslexiaFont,
+ $defaultTheme->getId() => $defaultTheme,
+ $lightTheme->getId() => $lightTheme,
+ $darkTheme->getId() => $darkTheme,
+ $highContrastTheme->getId() => $highContrastTheme,
+ $darkHighContrastTheme->getId() => $darkHighContrastTheme,
+ $dyslexiaFont->getId() => $dyslexiaFont,
];
}
/**
* Get the list of all registered themes
- *
+ *
* @return ITheme[]
*/
public function getThemes(): array {
@@ -74,7 +74,7 @@ class ThemesService {
/**
* Enable a theme for the logged-in user
- *
+ *
* @param ITheme $theme the theme to enable
* @return string[] the enabled themes
*/
@@ -87,18 +87,18 @@ class ThemesService {
}
/** @var ITheme[] */
- $themes = array_filter(array_map(function($themeId) {
+ $themes = array_filter(array_map(function ($themeId) {
return $this->getThemes()[$themeId];
}, $themesIds));
// Filtering all themes with the same type
- $filteredThemes = array_filter($themes, function(ITheme $t) use ($theme) {
+ $filteredThemes = array_filter($themes, function (ITheme $t) use ($theme) {
return $theme->getType() === $t->getType();
});
// Retrieve IDs only
/** @var string[] */
- $filteredThemesIds = array_map(function(ITheme $t) {
+ $filteredThemesIds = array_map(function (ITheme $t) {
return $t->getId();
}, array_values($filteredThemes));
@@ -110,7 +110,7 @@ class ThemesService {
/**
* Disable a theme for the logged-in user
- *
+ *
* @param ITheme $theme the theme to disable
* @return string[] the enabled themes
*/
@@ -130,7 +130,7 @@ class ThemesService {
/**
* Check whether a theme is enabled or not
* for the logged-in user
- *
+ *
* @return bool
*/
public function isEnabled(ITheme $theme): bool {
@@ -146,7 +146,7 @@ class ThemesService {
/**
* Get the list of all enabled themes IDs
* for the logged-in user
- *
+ *
* @return string[]
*/
public function getEnabledThemes(): array {
@@ -169,9 +169,9 @@ class ThemesService {
}
/**
- * Set the list of enabled themes
+ * Set the list of enabled themes
* for the logged-in user
- *
+ *
* @param string[] $themes the list of enabled themes IDs
*/
private function setEnabledThemes(array $themes): void {