summaryrefslogtreecommitdiff
path: root/app/Controller/PluginController.php
blob: 8d5628f10e37627862243d91c1a1cefb2e48921b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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'),
        )));
    }
}