AwsInspector\Command\Profile\EnableCommand::interact PHP Method

interact() protected method

protected interact ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function interact(InputInterface $input, OutputInterface $output)
    {
        $profile = $input->getArgument('profile');
        if (empty($profile)) {
            $profileManager = new Manager();
            $helper = $this->getHelper('question');
            $question = new ChoiceQuestion('Please select the profile you want to use', $profileManager->listAllProfiles());
            $question->setErrorMessage('Profile %s is invalid.');
            $profile = $helper->ask($input, $output, $question);
            $output->writeln('Selected Profile: ' . $profile);
            $input->setArgument('profile', $profile);
        }
    }