['setThemeOptions', 100] ]; } public function setThemeOptions(KernelEvent $event): void { // Ignore sub-requests if (!$event->isMainRequest()) { return; } if ($this->localeService->isRightToLeft($event->getRequest()->getLocale())) { $this->helper->setIsRightToLeft(true); } // ignore events like the toolbar where we do not have a token if (null === $this->storage->getToken()) { return; } $user = $this->storage->getToken()->getUser(); if (!($user instanceof User)) { return; } $skin = $user->getSkin(); if ($skin === 'dark') { $this->helper->setIsDarkMode(true); $this->helper->setThemeAuto(false); } elseif ($skin === 'auto') { $this->helper->setIsDarkMode(false); $this->helper->setThemeAuto(true); } else { $this->helper->setIsDarkMode(false); $this->helper->setThemeAuto(false); } // do not allow boxed layout, header is not compatible and other functions need the full size as well $this->helper->setIsBoxedLayout(false); $this->helper->setIsCondensedUserMenu(false); $this->helper->setIsCondensedNavbar(false); $this->helper->setIsNavbarOverlapping(false); $this->helper->setIsNavbarDark(true); $this->helper->setIsHeaderDark($this->helper->isDarkMode()); } }