src/Common.php
public function group($class, array $buttons, $form = '')
    {
        $attributes = array('class' => $this->prefixClasses('btn-group', array('xs', 'sm', 'lg', 'justified', 'vertical'), $class));
        if ($form == 'checkbox' || $form == 'radio') {
            $attributes['data-toggle'] = 'buttons-'.$form;
        }
        if (strpos($class, 'justified') !== false) {
            $buttons = '<div class="btn-group" role="group">'.implode('</div><div class="btn-group" role="group">', $buttons).'</div>';
        } else {
            $buttons = implode('', $buttons);
        }
        $attributes['role'] = 'group';

        return $this->page->tag('div', $attributes, $buttons);
    }
public function group($class, array $buttons, $form = '')
    {
        $attributes = array('class' => $this->prefixClasses('btn-group', array('xs', 'sm', 'lg', 'justified', 'vertical'), $class));
        if ($form == 'checkbox' || $form == 'radio') {
            $attributes['data-toggle'] = 'buttons-'.$form;
        }
        if (strpos($class, 'justified') !== false) {
            $buttons = '<div class="btn-group" role="group">'.implode('</div><div class="btn-group" role="group">', $buttons).'</div>';
        } else {
            $buttons = implode('', $buttons);
        }
        $attributes['role'] = 'group';

        return $this->page->tag('div', $attributes, $buttons);
    }
public function group ( $ class , array $ buttons , $ form = '' ) { $ attributes = array ( 'class' => $ this -> prefixClasses ( 'btn-group' , array ( 'xs' , 'sm' , 'lg' , 'justified' , 'vertical' ) , $ class ) ) ; if ( $ form == 'checkbox' || $ form == 'radio' ) { $ attributes [ 'data-toggle' ] = 'buttons-' . $ form ; } if ( strpos ( $ class , 'justified' ) !== false ) { $ buttons = '<div class="btn-group" role="group">' . implode ( '</div><div class="btn-group" role="group">' , $ buttons ) . '</div>' ; } else { $ buttons = implode ( '' , $ buttons ) ; } $ attributes [ 'role' ] = 'group' ; return $ this -> page -> tag ( 'div' , $ attributes , $ buttons ) ; }
Group your buttons together.

@param string $class   The classes: '**xs**', '**sm**', '**lg**', '**justified**', and '**vertical**' will all be prefixed with '**btn-group-...**', and we include the '**btn-group**' class too. When you size a group up, then don't size the individual buttons.
@param array  $buttons An ``array($bp->button(), ...)`` of buttons.
@param string $form    This can be either '**checkbox**' or '**radio**' and your button group will act accordingly.

@return string

@example

```php
echo $bp->group('', array(
$bp->button('default', 'Left'),
$bp->button('default', 'Middle'),
$bp->button('default', array('split'=>'Right'), array(
'dropdown' => array(
'Works' => '#',
'Here' => '#',
'Too' => '#',
),
'pull' => 'right',
)),
));
```
Group your buttons together .