src/TerminalObject/Dynamic/Checkbox/CheckboxGroup.php
public function setCurrent($direction)
    {
        list($option, $key) = $this->getCurrent();

        $option->setCurrent(false);

        $new_key = $this->getCurrentKey($direction, $option, $key);

        $this->checkboxes[$new_key]->setCurrent();
    }
public function setCurrent($direction)
    {
        list($option, $key) = $this->getCurrent();

        $option->setCurrent(false);

        $new_key = $this->getCurrentKey($direction, $option, $key);

        $this->checkboxes[$new_key]->setCurrent();
    }
public function setCurrent ( $ direction ) { list ( $ option , $ key ) = $ this -> getCurrent ( ) ; $ option -> setCurrent ( false ) ; $ new_key = $ this -> getCurrentKey ( $ direction , $ option , $ key ) ; $ this -> checkboxes [ $ new_key ] -> setCurrent ( ) ; }
Set the newly selected option based on the direction

@param string $direction 'previous' or 'next'
Set the newly selected option based on the direction