Subversion-Projekte lars-tiefland.laravel_shop

Revision

Revision 148 | Ganze Datei anzeigen | Leerzeichen ignorieren | Details | Blame | Letzte Änderung | Log anzeigen | RSS feed

Revision 148 Revision 399
Zeile 10... Zeile 10...
10
     * Renders the component using the given arguments.
10
     * Renders the component using the given arguments.
11
     *
11
     *
12
     * @param  string  $question
12
     * @param  string  $question
13
     * @param  array<array-key, string>  $choices
13
     * @param  array<array-key, string>  $choices
14
     * @param  mixed  $default
14
     * @param  mixed  $default
-
 
15
     * @param  int  $attempts
-
 
16
     * @param  bool  $multiple
15
     * @return mixed
17
     * @return mixed
16
     */
18
     */
17
    public function render($question, $choices, $default = null)
19
    public function render($question, $choices, $default = null, $attempts = null, $multiple = false)
18
    {
20
    {
19
        return $this->usingQuestionHelper(
21
        return $this->usingQuestionHelper(
20
            fn () => $this->output->askQuestion(
22
            fn () => $this->output->askQuestion(
21
                new ChoiceQuestion($question, $choices, $default)
23
                (new ChoiceQuestion($question, $choices, $default))
-
 
24
                    ->setMaxAttempts($attempts)
-
 
25
                    ->setMultiselect($multiple)
22
            ),
26
            ),
23
        );
27
        );
24
    }
28
    }
25
}
29
}