From 49f43090b214c4346a114922696b7d9d96d2c02e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Wed, 18 May 2016 22:07:49 -0400 Subject: Added plugin controller (WIP) --- app/Controller/Config.php | 13 ------------- app/Controller/PluginController.php | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 13 deletions(-) create mode 100644 app/Controller/PluginController.php (limited to 'app/Controller') diff --git a/app/Controller/Config.php b/app/Controller/Config.php index deafd05b..abf6565c 100644 --- a/app/Controller/Config.php +++ b/app/Controller/Config.php @@ -64,19 +64,6 @@ class Config extends BaseController $this->response->redirect($this->helper->url->to('config', $redirect)); } - /** - * Display the plugin page - * - * @access public - */ - public function plugins() - { - $this->response->html($this->helper->layout->config('config/plugins', array( - 'plugins' => $this->pluginLoader->plugins, - 'title' => t('Settings').' > '.t('Plugins'), - ))); - } - /** * Display the application settings page * diff --git a/app/Controller/PluginController.php b/app/Controller/PluginController.php new file mode 100644 index 00000000..8d5628f1 --- /dev/null +++ b/app/Controller/PluginController.php @@ -0,0 +1,38 @@ +response->html($this->helper->layout->plugin('plugin/show', array( + 'plugins' => $this->pluginLoader->plugins, + 'title' => t('Installed Plugins'), + ))); + } + + /** + * Display list of available plugins + */ + public function directory() + { + $plugins = $this->httpClient->getJson(PLUGIN_API_URL); + + $this->response->html($this->helper->layout->plugin('plugin/directory', array( + 'plugins' => $plugins, + 'title' => t('Plugin Directory'), + ))); + } +} -- cgit v1.2.3