[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/symfony/console/Question/ -> ChoiceQuestion.php (summary)

(no description)

File Size: 183 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ChoiceQuestion:: (8 methods):
  __construct()
  getChoices()
  setMultiselect()
  isMultiselect()
  getPrompt()
  setPrompt()
  setErrorMessage()
  getDefaultValidator()


Class: ChoiceQuestion  - X-Ref

Represents a choice question.

__construct(string $question, array $choices, $default = null)   X-Ref

param: string $question The question to ask to the user
param: array  $choices  The list of available choices
param: mixed  $default  The default answer to return

getChoices()   X-Ref
Returns available choices.

return: array

setMultiselect(bool $multiselect)   X-Ref
Sets multiselect option.

When multiselect is set to true, multiple choices can be answered.

return: $this

isMultiselect()   X-Ref
Returns whether the choices are multiselect.

return: bool

getPrompt()   X-Ref
Gets the prompt for choices.

return: string

setPrompt(string $prompt)   X-Ref
Sets the prompt for choices.

return: $this

setErrorMessage(string $errorMessage)   X-Ref
Sets the error message for invalid values.

The error message has a string placeholder (%s) for the invalid value.

return: $this

getDefaultValidator()   X-Ref
No description



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer