Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConfirmationQuestion.php

function ConfirmationQuestion::__construct

Parameters

string $question The question to ask to the user:

bool $default The default answer to return, true or false:

string $trueAnswerRegex A regex to match the "yes" answer:

Overrides Question::__construct

File

vendor/symfony/console/Question/ConfirmationQuestion.php, line 26

Class

ConfirmationQuestion
Represents a yes/no question.

Namespace

Symfony\Component\Console\Question

Code

public function __construct(string $question, bool $default = true, string $trueAnswerRegex = '/^y/i') {
    parent::__construct($question, $default);
    $this->setNormalizer($this->getDefaultNormalizer());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal