Added plugin controller (WIP)
This commit is contained in:
38
app/Controller/PluginController.php
Normal file
38
app/Controller/PluginController.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace Kanboard\Controller;
|
||||
|
||||
/**
|
||||
* Class PluginController
|
||||
*
|
||||
* @package Kanboard\Controller
|
||||
* @author Frederic Guillot
|
||||
*/
|
||||
class PluginController extends BaseController
|
||||
{
|
||||
/**
|
||||
* Display the plugin page
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
public function show()
|
||||
{
|
||||
$this->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'),
|
||||
)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user