Renders bootstrap3 button group
@param $button
@param $links
@return string
770660
public static function buttonGroup($button, $links)
    {
        foreach ($links as $key => $link) {
            $links[$key] = Html::beginTag('li')
                    . Html::a($link[0], $link[1], $link[2])
                . Html::endTag('li');
        }

        return Html::beginTag('div', ['class' => 'btn-group'])
                . Html::button($button[0], array_merge([
                    'type'=>"button",
                    'class'=>"btn btn-default dropdown-toggle",
                    'data-toggle'=>"dropdown",
                    'aria-haspopup'=>"true",
                    'aria-expanded'=>"false"
                ], $button[1]))
                . Html::beginTag('ul', ['class' => 'dropdown-menu'])
                    . implode('', $links)
                . Html::endTag('ul')
            . Html::endTag('div');
    }
438945
private function renderRemoveButton()
    {
        $options = [
            'class' => 'multiple-input-list__btn js-input-remove',
        ];
        Html::addCssClass($options, $this->removeButtonOptions['class']);

        return Html::tag('div', $this->removeButtonOptions['label'], $options);
    }
1347515
protected function render(): string
    {
        switch ($this->mode) {
            case 'button':
                $html = '<button class="btn' . $this->classes() . '" type="submit"' .
                    (($this->disabled === true) ? ' disabled' : null) .
                    '>' . $this->label . '</button>';
                break;

            case 'input':
                $html = '<input class="btn' . $this->classes() . '" type="' .
                    $this->input_type . '" value="' .
                    $this->label . '" ' .
                    (($this->disabled === true) ? ' disabled ' : null) . '/>';
                break;

            default:
                $html = '<a href="' . (($this->uri !== null) ? $this->uri : '#') .
                    '" class="btn' . $this->classes() .
                    (($this->disabled === true) ? ' disabled' : null) .
                    '" role="button">' . $this->label . '</a>';
                break;
        }

        return $html;
    }
1152922
public function resolveForButtonPress($button)
    {
        foreach ($this->buttonFinders as $method) {
            if (! is_null($element = $this->{$method}($button))) {
                return $element;
            }
        }

        throw new InvalidArgumentException(
            "Unable to locate button [{$button}]."
        );
    }
295634
protected function bootstrapButtonGroup($class, $role, array $buttons) {

        $attributes = [];

        $attributes["class"] = $class;
        $attributes["role"]  = $role;

        $innerHTML = "\n" . implode("\n", $buttons) . "\n";

        return static::coreHTMLElement("div", $innerHTML, $attributes);
    }
319992
public function renderButtons() {
		
		$output = '';
		foreach ($this->getButtons() as $button) {
			$output .= $this->renderElement($button);
		}

		if ($output !== '' && $this->activeFormWidget->type !== TbActiveForm::TYPE_INLINE) {
			$output = "<div class=\"form-actions\">\n" . $output . "</div>\n";
		}

		return $output;
	}
653821
public function addButtonEdit($link = '#', $binds = [], $is_remote = true, $method = 'post')
    {


        $c = new Column\Button(configurator()->get('button.edit.name'), configurator()->get('button.edit.label'), $link, $binds);
        $c->setOptionAsPrimary();
        $c->icon(configurator()->get('button.edit.icon'));
        if ($is_remote) {
            $c->enableRemote($method);
        }

        $this->addColumn($c);
        return $c;
    }
1257922
protected function render_user_button(user_button $button) {
        $data = $button->export_for_template($this);
        return $this->render_from_template('gradereport_history/user_button', $data);
    }
194106
protected function renderToggleButton()
    {
        if (!isset($this->toggleButtonOptions['options']['data-target'])) {
            $this->toggleButtonOptions['options']['data-target'] = $this->options['id'];
        }
        Html::addCssClass($this->toggleButtonOptions['options'], ['toggle-button' => 'dropdown-trigger']);

        return Button::widget($this->toggleButtonOptions);
    }
117514
protected function renderCollapseButton($options = [], $collapsed = false)
    {
        $options = array_replace_recursive([
            'class' => 'btn btn-box-tool',
            'data-widget' => 'collapse',
        ], $options);

        return Html::button($collapsed ? FA::i('plus') : FA::i('minus'), $options);
    }
102079
public static function buttonGroup(array $buttons, $htmlOptions = array())
    {
        if (!empty($buttons)) {
            self::addCssClass('btn-group', $htmlOptions);
            if (TbArray::popValue('vertical', $htmlOptions, false)) {
                self::addCssClass('btn-group-vertical', $htmlOptions);
            }
            $toggle = TbArray::popValue('toggle', $htmlOptions);
            if (!empty($toggle)) {
                $htmlOptions['data-toggle'] = 'buttons-' . $toggle;
            }
            $parentOptions = array(
                'color' => TbArray::popValue('color', $htmlOptions),
                'size' => TbArray::popValue('size', $htmlOptions),
                'disabled' => TbArray::popValue('disabled', $htmlOptions)
            );
            $output = self::openTag('div', $htmlOptions);
            foreach ($buttons as $buttonOptions) {
                if (isset($buttonOptions['visible']) && $buttonOptions['visible'] === false) {
                    continue;
                }
                // todo: consider removing the support for htmlOptions.
                $options = TbArray::popValue('htmlOptions', $buttonOptions, array());
                if (!empty($options)) {
                    $buttonOptions = TbArray::merge($options, $buttonOptions);
                }
                $buttonLabel = TbArray::popValue('label', $buttonOptions, '');
                $buttonOptions = TbArray::copyValues(array('color', 'size', 'disabled'), $parentOptions, $buttonOptions);
                $items = TbArray::popValue('items', $buttonOptions, array());
                if (!empty($items)) {
                    $output .= self::buttonDropdown($buttonLabel, $items, $buttonOptions);
                } else {
					$type = TbArray::popValue('type', $buttonOptions, self::BUTTON_TYPE_LINKBUTTON);
					$output .= self::btn($type, $buttonLabel, $buttonOptions);
                }
            }
            $output .= '</div>';
            return $output;
        }
        return '';
    }
788841
public function button(Form\Element\Button $element)
    {

        //@todo prendre en compte les option et les size
        $element->addClass('btn btn-default');
        $element->addAttribute('id', $element->getName());
        $html  = '<div class="form-group">';
        $html .= '<label class="col-md-3 control-label">&nbsp;</label>';
        $html .= '<div class="col-md-9">' . html('button', $element->getAttributes(), $element->getLabel()) . '</div>';
        $html .= '</div>';
        return $html;
    }
591639
public static function buttonToolbar(array $groups, $htmlOptions = array())
    {
        if (!empty($groups)) {
            self::addCssClass('btn-toolbar', $htmlOptions);
            $parentOptions = array(
                'color' => TbArray::popValue('color', $htmlOptions),
                'size' => TbArray::popValue('size', $htmlOptions),
                'disabled' => TbArray::popValue('disabled', $htmlOptions)
            );
            $output = self::openTag('div', $htmlOptions);
            foreach ($groups as $groupOptions) {
                if (isset($groupOptions['visible']) && $groupOptions['visible'] === false) {
                    continue;
                }
                $items = TbArray::popValue('items', $groupOptions, array());
                if (empty($items)) {
                    continue;
                }
                // todo: consider removing the support for htmlOptions.
                $options = TbArray::popValue('htmlOptions', $groupOptions, array());
                if (!empty($options)) {
                    $groupOptions = TbArray::merge($options, $groupOptions);
                }
                $groupOptions = TbArray::copyValues(array('color', 'size', 'disabled'), $parentOptions, $groupOptions);
                $output .= self::buttonGroup($items, $groupOptions);
            }
            $output .= '</div>';
            return $output;
        }
        return '';
    }
1134204
private function validateButtons($buttons)
    {
        if ($buttons === false)
            return $buttons;

        foreach($buttons as $q=>$w)
        {
            $buttons[$q] = ButtonReactManager::validateButton($w,$this->getTranslator(),$this->getTemplateManager());
        }
        return $buttons;
    }
279
protected function renderButton($dropdown) {
    $dropdownId = $dropdown->getId();
    
    $label = $this->label;
    if ($this->encodeLabel) {
      $label = Html::encode($label);
    }
    if ($this->split) {
      $this->tagName = 'a';
      Html::addCssClass($this->options, 'button');
      Html::addCssClass($this->options, 'split');
      $options = $this->options;
      $label .= Html::tag('span', '', ['data-dropdown' => $dropdownId]);
    } else {
      Html::addCssClass($this->options, 'dropdown');
      $options = $this->options;
      
      $options['data-dropdown'] = $dropdownId;
    }

    return Button::widget([
            'tagName' => $this->tagName,
            'label' => $label,
            'options' => $options,
            'url' => $this->url,
            'encodeLabel' => false,
        ]) . "<br />\n";
  }
852046
private function renderButton()
    {
        $this->params = Json::encode([
            'btnName' => $this->options['id'],
            'cookieName' => $this->cookie['name'],
            'cookieValue' => addslashes($this->getHashedCookieValue($this->cookie['value'])),
            'cookieOptions' => isset($this->cookie['options']) ? $this->cookie['options'] : null,
        ]);

        if($this->cookie($this->cookie['name'])) {
            Html::addCssClass($this->options, 'active');
        }

        echo Button::widget([
            'label' => $this->encodeLabel ? Html::encode($this->label) : $this->label,
            'encodeLabel' => $this->encodeLabel,
            'options' => ArrayHelper::merge(['data-toggle' => 'button'], $this->options),
        ]);
    }
1246231
protected function renderButton()
    {
        Html::addCssClass($this->buttonOptions, ['widget' => 'btn']);
        $label = $this->label;
        if ($this->encodeLabel) {
            $label = Html::encode($label);
        }

        if ($this->split) {
            $buttonOptions = $this->buttonOptions;
            $this->buttonOptions['data-toggle'] = 'dropdown';
            $this->buttonOptions['aria-haspopup'] = 'true';
            $this->buttonOptions['aria-expanded'] = 'false';
            Html::addCssClass($this->buttonOptions, ['toggle' => 'dropdown-toggle dropdown-toggle-split']);
            unset($buttonOptions['id']);
            $splitButton = Button::widget([
                'label' => '<span class="sr-only">Toggle Dropdown</span>',
                'encodeLabel' => false,
                'options' => $this->buttonOptions,
                'view' => $this->getView(),
            ]);
        } else {
            $buttonOptions = $this->buttonOptions;
            Html::addCssClass($buttonOptions, ['toggle' => 'dropdown-toggle']);
            $buttonOptions['data-toggle'] = 'dropdown';
            $buttonOptions['aria-haspopup'] = 'true';
            $buttonOptions['aria-expanded'] = 'false';
            $splitButton = '';
        }

        if (isset($buttonOptions['href'])) {
            if (is_array($buttonOptions['href'])) {
                $buttonOptions['href'] = Url::to($buttonOptions['href']);
            }
        } else {
            if ($this->tagName === 'a') {
                $buttonOptions['href'] = '#';
                $buttonOptions['role'] = 'button';
            }
        }

        return Button::widget([
                'tagName' => $this->tagName,
                'label' => $label,
                'options' => $buttonOptions,
                'encodeLabel' => false,
                'view' => $this->getView(),
            ]) . "\n" . $splitButton;
    }