Symfony\Component\Console\Style\SymfonyStyle::confirm PHP Method

confirm() public method

public confirm ( $question, $default = true )
    public function confirm($question, $default = true)
    {
        return $this->askQuestion(new ConfirmationQuestion($question, $default));
    }

Usage Example

Example #1
0
 /**
  * @return Changelog
  */
 protected function getChangelog()
 {
     $changelogPath = $this->environment->getChangelogPath();
     if (!$this->environment->hasChangelog() && $this->output->confirm('No CHANGELOG.md exists, create it?')) {
         $stub = file_get_contents(__DIR__ . '/../../stubs/CHANGELOG.md');
         file_put_contents($changelogPath, $stub);
     }
     return new Changelog($changelogPath);
 }
All Usage Examples Of Symfony\Component\Console\Style\SymfonyStyle::confirm