DialogHelper deprecated::select()

int|string|array select(OutputInterface $output, string|array $question, array $choices, bool|string $default = null, bool|int $attempts = false, string $errorMessage = 'Value "%s" is invalid', bool $multiselect = false)

Asks the user to select a value.

Parameters

OutputInterface $output An Output instance
string|array $question The question to ask
array $choices List of choices to pick from
bool|string $default The default answer if the user enters nothing
bool|int $attempts Max number of times to ask before giving up (false by default, which means infinite)
string $errorMessage Message which will be shown if invalid value from choice list would be picked
bool $multiselect Select more than one value separated by comma

Return Value

int|string|array The selected value or values (the key of the choices array)

Exceptions

InvalidArgumentException
doc_Symfony
2016-10-28 06:14:12
Comments
Leave a Comment

Please login to continue.