Ejemplo n.º 1
0
 /**
  * 列出系统中的主题
  *
  * @param $f3
  */
 public function ListTheme($f3)
 {
     global $smarty;
     $themeInstanceArray = ThemeHelper::listPluginArray();
     if (empty($themeInstanceArray)) {
         goto out_display;
     }
     // 构造显示数组
     $themeArray = array();
     foreach ($themeInstanceArray as $themeInstanceItem) {
         $themeInstance = $themeInstanceItem['pluginInstance'];
         $instanceClassName = get_class($themeInstance);
         $themeArray[] = array('pluginDirName' => $themeInstanceItem['pluginDirName'], 'pluginDisplayName' => $themeInstance->pluginGetDisplayName(), 'pluginDescText' => $themeInstance->pluginGetDescText(), 'pluginUniqueId' => $instanceClassName::pluginGetUniqueId(), 'installVersion' => $instanceClassName::getOptionValue('version', true), 'pluginVersion' => $themeInstance->pluginGetVersion(), 'pluginConfigureUrl' => $themeInstance->pluginGetConfigureUrl(PluginHelper::SYSTEM_MANAGE), 'pluginIsInstall' => ThemeHelper::isThemeInstall($themeInstanceItem['pluginDirName']), 'pluginIsActive' => ThemeHelper::isThemeActive($themeInstanceItem['pluginDirName']), 'pluginIsNeedUpdate' => $themeInstance->pluginIsNeedUpdate());
     }
     $smarty->assign('themeArray', $themeArray);
     out_display:
     $smarty->display('plugin_theme_listtheme.tpl');
 }