src/View/Helper/FormHelper.php
public function buttonGroup($buttons, array $options = []) {
        $options += [
            'vertical' => false,
            'templateVars' => []
        ];
        if ($options['vertical']) {
            $options = $this->addClass($options, 'btn-group-vertical');
        }
        return $this->formatTemplate('buttonGroup', [
            'content' => implode('', $buttons),
            'attrs' => $this->templater()->formatAttributes($options, ['vertical']),
            'templateVars' => $options['templateVars']
        ]);
    }
public function buttonGroup($buttons, array $options = []) {
        $options += [
            'vertical' => false,
            'templateVars' => []
        ];
        if ($options['vertical']) {
            $options = $this->addClass($options, 'btn-group-vertical');
        }
        return $this->formatTemplate('buttonGroup', [
            'content' => implode('', $buttons),
            'attrs' => $this->templater()->formatAttributes($options, ['vertical']),
            'templateVars' => $options['templateVars']
        ]);
    }
public function buttonGroup ( $ buttons , array $ options = [ ] ) { $ options += [ 'vertical' => false , 'templateVars' => [ ] ] ; if ( $ options [ 'vertical' ] ) { $ options = $ this -> addClass ( $ options , 'btn-group-vertical' ) ; } return $ this -> formatTemplate ( 'buttonGroup' , [ 'content' => implode ( '' , $ buttons ) , 'attrs' => $ this -> templater ( ) -> formatAttributes ( $ options , [ 'vertical' ] ) , 'templateVars' => $ options [ 'templateVars' ] ] ) ; }
Creates a button group using the given buttons.

### Options

- `vertical` Specifies if the group should be vertical. Default to `false`.
Other options are passed to the `Html::tag` method.

@param array $buttons Array of buttons for the group.
@param array $options Array of options. See above.

@return string A HTML string containing the button group.
Creates a button group using the given buttons .