/** * @param ConsoleCheckBox $item * * @return bool */ public function checkBoxList($item) { if (!$this->interactive) { return true; } $c = null; while (!in_array($c, ["y", "n"])) { if ($c) { $item->check($c); } Console::clearScreen(); echo " Prompt Y for confirm choose or N for discard\n\n"; $this->outList($item->items); echo "\n"; if ($this->errors) { echo "\n"; echo "Warning!! Error\n"; foreach ($this->errors as $error) { echo $error . "\n"; } echo "\n"; } $c = strtolower($this->prompt(" Check [1.." . count($item->items) . "], 'Y' for confirm:")); } return $c == "y"; }