public function actionPreviewTheme($themeName) { $theme = Media::model()->findByAttributes(array('associationType' => 'theme ', 'fileName' => $themeName)); if ($theme) { $settings = CJSON::decode($theme->description); ThemeGenerator::previewTheme($settings); } }