@ -7,7 +7,6 @@
namespace yii\bootstrap;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
/**
@ -81,14 +80,10 @@ class ButtonGroup extends Widget
$buttons = [];
foreach ($this->buttons as $button) {
if (is_array($button)) {
$label = ArrayHelper::getValue($button, 'label');
$button['view'] = $this->getView();
$options = ArrayHelper::getValue($button, 'options');
if (!isset($button['encodeLabel']))
$buttons[] = Button::widget([
$button['encodeLabel'] = $this->encodeLabels;
'label' => $label,
$buttons[] = Button::widget($button);
'options' => $options,
'encodeLabel' => $this->encodeLabels,
'view' => $this->getView()
]);
} else {
$buttons[] = $button;
}