src/widget/ButtonGroup.php
protected function renderButtons()
    {
        $buttons = [];
        foreach ($this->buttons as $button) {
            if (is_array($button)) {
                if(isset($button['dropdown'])){
                    $option = array_merge($button['dropdown'], [
                        'view' => $this->getView()
                    ]);
                    $buttons[] = ButtonDropdown::widget($option);
                }else{
                    $label = ArrayHelper::getValue($button, 'label');
                    $options = ArrayHelper::getValue($button, 'options');
                    $buttons[] = Button::widget([
                        'label' => $label,
                        'options' => $options,
                        'encodeLabel' => $this->encodeLabels,
                        'view' => $this->getView()
                    ]);
                }
            } else {
                $buttons[] = $button;
            }
        }

        return implode("\n", $buttons);
    }
protected function renderButtons()
    {
        $buttons = [];
        foreach ($this->buttons as $button) {
            if (is_array($button)) {
                if(isset($button['dropdown'])){
                    $option = array_merge($button['dropdown'], [
                        'view' => $this->getView()
                    ]);
                    $buttons[] = ButtonDropdown::widget($option);
                }else{
                    $label = ArrayHelper::getValue($button, 'label');
                    $options = ArrayHelper::getValue($button, 'options');
                    $buttons[] = Button::widget([
                        'label' => $label,
                        'options' => $options,
                        'encodeLabel' => $this->encodeLabels,
                        'view' => $this->getView()
                    ]);
                }
            } else {
                $buttons[] = $button;
            }
        }

        return implode("\n", $buttons);
    }
Generates the buttons that compound the group as specified on [[buttons]].
@return string the rendering result.