Commit 538068fe authored by Jon Pugh's avatar Jon Pugh

Use SiteContext to pull in all inputOptions in `bin/provision save` command

parent aba638f3
......@@ -3,6 +3,7 @@
namespace Aegir\Provision\Command;
use Aegir\Provision\Command;
use Aegir\Provision\Context\SiteContext;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputDefinition;
use Symfony\Component\Console\Input\InputOption;
......@@ -42,6 +43,10 @@ class SaveCommand extends Command
// @TODO: Load up all ProvisionContextTypes and inject their options.
// Load all SiteContext options
foreach (SiteContext::option_documentation() as $option => $description) {
$inputDefinition[] = new InputOption($option, NULL, InputOption::VALUE_OPTIONAL, $description);
}
return new InputDefinition($inputDefinition);
}
......
......@@ -5,9 +5,10 @@ namespace Aegir\Provision\Context;
use Aegir\Provision\Context;
/**
* @file Provision named context site class.
* Class SiteContext
*
* @package Aegir\Provision\Context
*/
class SiteContext extends Context {
static function option_documentation() {
return array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment