Skip to content

Commit

Permalink
Add module dependencies to requirements page
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jul 26, 2022
1 parent 6434173 commit a2c019e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions modules/setup/application/forms/ModulePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

use Icinga\Application\Icinga;
use Icinga\Application\Modules\Module;
use Icinga\Module\Setup\ModuleDependency;
use Icinga\Web\Form;

class ModulePage extends Form
Expand Down Expand Up @@ -100,6 +101,8 @@ public function getModuleWizards()
foreach ($checked as $name => $module) {
if ($module->providesSetupWizard()) {
$wizards[$name] = $module->getSetupWizard();
} elseif (! empty($module->getRequiredModules())) {
$wizards[$name] = new ModuleDependency($module, array_keys($checked));
}
}

Expand Down
4 changes: 3 additions & 1 deletion modules/setup/library/Setup/WebWizard.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ protected function init()
if (($modulePageData = $this->getPageData('setup_modules')) !== null) {
$modulePage = $this->getPage('setup_modules')->populate($modulePageData);
foreach ($modulePage->getModuleWizards() as $moduleWizard) {
$this->addPage($moduleWizard);
if (! $moduleWizard instanceof ModuleDependency) {
$this->addPage($moduleWizard);
}
}
}
}
Expand Down

0 comments on commit a2c019e

Please sign in to comment.