We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
I can't figure out how I can use the setResult method.
I miss an addCheckbox method so here is my workaround
addCheckbox
$menu = $this->menu("Pick your items"); $selected = collect([]); $list = collect(['Mozarella', 'Mushroom', 'Origan', 'Emmental']); $list->each(function ($item) use ($menu, &$selected) { $menu->addCheckboxItem(ucfirst($item), function ($menu) use ($item, $selected) { $selected->push($item); $menu->setResult($selected); }); }); $items = $menu->open();
Unfortunately, this does not work because $menu is a CLIMenu instance instead of a Menu one:
CLIMenu
Menu
Call to undefined method PhpSchool\CliMenu\CliMenu::setResult()
How are we supposed to use the Menu::setResult method ?
Menu::setResult
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
I can't figure out how I can use the setResult method.
I miss an
addCheckbox
method so here is my workaroundUnfortunately, this does not work because $menu is a
CLIMenu
instance instead of aMenu
one:Call to undefined method PhpSchool\CliMenu\CliMenu::setResult()
How are we supposed to use the
Menu::setResult
method ?The text was updated successfully, but these errors were encountered: