update PluginController to use PHPCI plugin directory as well as composer to get information about installed plugins.
This commit is contained in:
parent
28fc30682b
commit
aa33a8761e
3 changed files with 60 additions and 4 deletions
|
|
@ -12,6 +12,8 @@ namespace PHPCI\Controller;
|
|||
use b8;
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Plugin\Util\ComposerPluginInformation;
|
||||
use PHPCI\Plugin\Util\FilesPluginInformation;
|
||||
use PHPCI\Plugin\Util\PluginInformationCollection;
|
||||
|
||||
/**
|
||||
* Plugin Controller - Provides support for installing Composer packages.
|
||||
|
|
@ -63,9 +65,14 @@ class PluginController extends \PHPCI\Controller
|
|||
$this->view->installedPackages = $json['require'];
|
||||
$this->view->suggestedPackages = $json['suggest'];
|
||||
|
||||
$pluginInfo = ComposerPluginInformation::buildFromYaml(
|
||||
$pluginInfo = new PluginInformationCollection();
|
||||
$pluginInfo->add(FilesPluginInformation::newFromDir(
|
||||
PHPCI_DIR . "PHPCI/Plugin/"
|
||||
));
|
||||
$pluginInfo->add(ComposerPluginInformation::buildFromYaml(
|
||||
PHPCI_DIR . "vendor/composer/installed.json"
|
||||
);
|
||||
));
|
||||
|
||||
$this->view->plugins = $pluginInfo->getInstalledPlugins();
|
||||
|
||||
return $this->view->render();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue