update plugin controller to display plugin information as well as composer package information.

This commit is contained in:
meadsteve 2013-12-29 17:35:33 +00:00
commit 4b9207e05f
2 changed files with 38 additions and 9 deletions

View file

@ -11,6 +11,7 @@ namespace PHPCI\Controller;
use b8;
use PHPCI\Model\Build;
use PHPCI\Plugin\Util\LoadedPluginInformation;
/**
* Plugin Controller - Provides support for installing Composer packages.
@ -59,8 +60,13 @@ class PluginController extends \PHPCI\Controller
$this->view->required = $this->required;
$json = $this->getComposerJson();
$this->view->installed = $json['require'];
$this->view->suggested = $json['suggest'];
$this->view->installedPackages = $json['require'];
$this->view->suggestedPackages = $json['suggest'];
$pluginInfo = LoadedPluginInformation::buildFromYaml(
PHPCI_DIR . "vendor/composer/installed.json"
);
$this->view->plugins = $pluginInfo->getInstalledPlugins();
return $this->view->render();
}