Shopware\Install\Command\ShopwareInstallReleaseCommand::askGenericOptions PHP Method

askGenericOptions() private method

Make sure, that some required fields are available
private askGenericOptions ( Symfony\Component\Console\Input\InputInterface $input, ShopwareCli\Services\IoService $ioService )
$input Symfony\Component\Console\Input\InputInterface
$ioService ShopwareCli\Services\IoService
    private function askGenericOptions(InputInterface $input, IoService $ioService)
    {
        $required = array('admin-username' => 'backend user name', 'admin-password' => 'backend user password', 'admin-name' => 'your full name', 'admin-email' => 'your email');
        $config = $this->getConfig();
        foreach ($required as $field => $description) {
            // If field was set via cli option, use that
            if ($input->getOption($field)) {
                continue;
            }
            // else: check if the option is configured via config
            if (isset($config['ShopConfig']) && isset($config['ShopConfig'][$field])) {
                $input->setOption($field, $config['ShopConfig'][$field]);
                continue;
            }
            //
            $fieldData = $ioService->askAndValidate("Please enter {$description}: ", array($this, 'genericValidator'));
            $input->setOption($field, $fieldData);
        }
    }