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

Breadcrumb

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

function Question::setHidden

Sets whether the user response must be hidden or not.

Return value

$this

Throws

LogicException In case the autocompleter is also used

File

vendor/symfony/console/Question/Question.php, line 94

Class

Question
Represents a Question.

Namespace

Symfony\Component\Console\Question

Code

public function setHidden(bool $hidden) : static {
    if ($this->autocompleterCallback) {
        throw new LogicException('A hidden question cannot use the autocompleter.');
    }
    $this->hidden = $hidden;
    return $this;
}
RSS feed
Powered by Drupal