Exemplo n.º 1
0
 public function runSkin(Trace $trace, Request $request)
 {
     // set skin
     if ($request->getParameter('skinSelect')) {
         $this->skinSettings->setUserSkinName($request->getParameter('skinSelect'));
         // apply the skin for current request(user skin may be applied before this function)
         $this->displayManager->setSkin($this->skinSettings->getUserSkin());
     }
     $params = array('availableSkins' => $this->skinSettings->getAvailableSkins(), 'currentSkin' => $this->skinSettings->getUserSkinName());
     return $this->renderResponse('settings/skin', $params);
 }
 public function runSkin(Trace $trace, Context $context)
 {
     $request = $context->getRequest();
     $response = $context->getResponse();
     $skinSettings = new SkinSettings($this->config, $this->settingsStorage);
     // set skin
     if ($request->getParameter('skinSelect')) {
         $skinSettings->setUserSkinName($request->getParameter('skinSelect'));
         // apply the skin for current request(user skin may be applied before this function)
         $response->setSkin($skinSettings->getUserSkin());
     }
     $response->set('availableSkins', $skinSettings->getAvailableSkins());
     $response->set('currentSkin', $skinSettings->getUserSkinName());
     $response->setTemplate('settings/skin');
 }