Merge pull request #19491 from kamil-tekiela/ThemeManager-small-changes
ThemeManager small changes
This commit is contained in:
commit
47652b11f4
@ -116,9 +116,6 @@ class ThemeManager
|
||||
$this->activeTheme = $theme;
|
||||
$this->theme = $this->themes[$theme];
|
||||
|
||||
// need to set later
|
||||
//$this->setThemeCookie();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -230,7 +227,14 @@ class ThemeManager
|
||||
return array_key_exists($theme ?? '', $this->themes);
|
||||
}
|
||||
|
||||
/** @return mixed[] */
|
||||
/** @return array{
|
||||
* id: string,
|
||||
* name: string,
|
||||
* version: string,
|
||||
* is_active: bool,
|
||||
* color_mode: string,
|
||||
* color_modes: array<string|int, string>
|
||||
* }[] $themes */
|
||||
public function getThemesArray(): array
|
||||
{
|
||||
$themes = [];
|
||||
|
||||
@ -54,11 +54,6 @@ class ThemeManagerTest extends AbstractTestCase
|
||||
$tm->initializeTheme();
|
||||
$themes = $tm->getThemesArray();
|
||||
self::assertArrayHasKey(0, $themes);
|
||||
self::assertIsArray($themes[0]);
|
||||
self::assertArrayHasKey('id', $themes[0]);
|
||||
self::assertArrayHasKey('name', $themes[0]);
|
||||
self::assertArrayHasKey('version', $themes[0]);
|
||||
self::assertArrayHasKey('is_active', $themes[0]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user