src/widget/Collapse.php
public function renderItems()
    {
        $items = [];
        $index = 0;
        foreach ($this->items as $header => $item) {
            $options = ArrayHelper::getValue($item, 'options', []);            
            Html::addCssClass($options, ($this->box) ? 'panel box' : 'panel' );
            $items[] = Html::tag('div', $this->renderItem($header, $item, ++$index), $options);
        }

        return implode("\n", $items);
    }
public function renderItems()
    {
        $items = [];
        $index = 0;
        foreach ($this->items as $header => $item) {
            $options = ArrayHelper::getValue($item, 'options', []);            
            Html::addCssClass($options, ($this->box) ? 'panel box' : 'panel' );
            $items[] = Html::tag('div', $this->renderItem($header, $item, ++$index), $options);
        }

        return implode("\n", $items);
    }
Renders collapsible items as specified on [[items]].
@return string the rendering result