private function setDefaultSelectedItem() : void
    {
        foreach ($this->items as $index => $item) {
            if ($item->canSelect()) {
                $this->canBeSelected = true;
                $this->selectedItemIndex = $index;
                return;
            }
        }

        $this->canBeSelected = false;
        $this->selectedItemIndex = null;
    }
private function setDefaultSelectedItem() : void
    {
        foreach ($this->items as $index => $item) {
            if ($item->canSelect()) {
                $this->canBeSelected = true;
                $this->selectedItemIndex = $index;
                return;
            }
        }

        $this->canBeSelected = false;
        $this->selectedItemIndex = null;
    }
private function setDefaultSelectedItem ( ) : void { foreach ( $ this -> items as $ index => $ item ) { if ( $ item -> canSelect ( ) ) { $ this -> canBeSelected = true ; $ this -> selectedItemIndex = $ index ; return ; } } $ this -> canBeSelected = false ; $ this -> selectedItemIndex = null ; }
Select default item
Select default item