Neos\Flow\Cli\ConsoleOutput::select PHP Method

select() public method

Asks the user to select a value
public select ( string | array $question, array $choices, boolean $default = null, boolean $multiSelect = false, boolean | integer $attempts = false ) : integer | string | array
$question string | array The question to ask. If an array each array item is turned into one line of a multi-line question
$choices array List of choices to pick from
$default boolean The default answer if the user enters nothing
$multiSelect boolean If TRUE the result will be an array with the selected options. Multiple options can be given separated by commas
$attempts boolean | integer Max number of times to ask before giving up (false by default, which means infinite)
return integer | string | array The selected value or values (the key of the choices array)
    public function select($question, $choices, $default = null, $multiSelect = false, $attempts = false)
    {
        return $this->getDialogHelper()->select($this->output, $question, $choices, $default, $attempts, 'Value "%s" is invalid', $multiSelect);
    }