Example #1
0
 /**
  *
  * @param integer $themeId
  */
 public function resetTheme($themeId)
 {
     $this->themeControlValueDao->deleteThemeControlValues($themeId);
     $controls = $this->themeControlValueDao->findByThemeId($themeId);
     /* @var $control BOL_ThemeControlValue */
     foreach ($controls as $control) {
         if (strstr($control->getValue(), 'url')) {
             $this->unlinkControlValueImage($control->getValue());
         }
     }
     //TODO remake temp fix
     $curentValue = json_decode(OW::getConfig()->getValue('base', 'master_page_theme_info'), true);
     unset($curentValue[$themeId]);
     OW::getConfig()->saveConfig('base', 'master_page_theme_info', json_encode($curentValue));
     $this->updateCustomCssFile($themeId);
 }