Open
Description
Something along these lines:
$builder = (new CliMenuBuilder)
->addItem('Load Available Options', function (CliMenu $menuItem) {
/**
* Here I would load available options from DB and add them as $menu's subMenu
*/
$loadedOptions = ['Opt1', 'Opt2', 'Opt3'];
$builder = $menuItem->getBuilder();
$subMenu = $builder->addSubMenu('Options');
foreach ($loadedOptions as $opt) {
$subMenu->addItem($opt);
}
$builder->build();
})
->build();
$builder->open();
In other words, a support for dynamically adding submenus when a menu item is selected would be an amazing feature.
Keep up the great work!
Thank you :)
Metadata
Metadata
Assignees
Labels
No labels