tpl_mainpage = 'plugin/index.tpl'; $this->tpl_mainno = 'plugin'; $this->tpl_subno = 'index'; $this->tpl_subtitle = 'プラグイン管理'; } /** * Page のプロセス. * * @return void */ function process() { $this->action(); $this->sendResponse(); } /** * Page のアクション. * * @return void */ function action() { $objSess = new SC_Session(); // 認証可否の判定 SC_Utils_Ex::sfIsSuccess($objSess); $this->loadPluginsList(); } /** * デストラクタ. * * @return void */ function destroy() { parent::destroy(); } /** * プラグインの一覧を読み込む * * @return void */ function loadPluginsList() { $plugins = array(); $this->arrInstalledPlugin = array(); $this->arrInstallablePlugin = array(); $d = dir(PLUGIN_PATH); while (false !== ($entry = $d->read())) { if ($entry == '.') continue; if ($entry == '..') continue; if (!is_dir($d->path . $entry)) continue; $plugins[$entry]['dir_exists'] = true; } $d->close(); $pluginsXml = SC_Utils_Ex::sfGetPluginsXml(); foreach ($pluginsXml->plugin as $plugin) { $plugins[(string)$plugin->path]['installed'] = true; } foreach ($plugins as $path=>$plugin) { $plugin['info'] = SC_Utils_Ex::sfGetPluginInfoArray($path); $plugin['path'] = $path; if ($plugin['installed']) { $this->arrInstalledPlugin[] = $plugin; } else { $this->arrInstallablePlugin[] = $plugin; } } } } ?>