protected function renderToolbar()
{
if (empty($this->toolbar) || !is_string($this->toolbar) && !is_array($this->toolbar)) {
return '';
}
if (is_string($this->toolbar)) {
return $this->toolbar;
}
$toolbar = '';
foreach ($this->toolbar as $item) {
if (is_array($item)) {
$content = ArrayHelper::getValue($item, 'content', '');
$options = ArrayHelper::getValue($item, 'options', []);
static::initCss($options, 'btn-group');
$toolbar .= Html::tag('div', $content, $options);
} else {
$toolbar .= "\n{$item}";
}
}
return $toolbar;
}