Skip to content
VMBindraban edited this page Mar 4, 2013 · 3 revisions

The SxBootstap buttonGroup view helper shows a buttonGroup made with the twitter bootstrap and [sxbButton] (https://github.com/RWOverdijk/SxBootstrap/wiki/Button). The following syntax builds the buttonGroup.

<?php
 echo $this->sxbButtonGroup($arrayButtons);
?>

Explicit usage

<?php
$options = array(
    'name'              => 'buttonName',
    'id'                => 'buttonID',
    'data-loading-text' => 'Loading..',
    'data-toggle'       => 'button',
);

$buttons = array(
    $this->sxbButton($options),
    $this->sxbButton($options),
);

echo $this->sxbButtonGroup($buttons);
?>

Data types

<?php
// checkbox, radio
echo $this->sxbButtonGroup($buttons)->radio();
?>

Class types

<?php
// vertical
echo $this->sxbButtonGroup($buttons)->vertical();
?>

Content types

<?php
// addClass, addButton
echo $this->sxbButtonGroup($buttons)->addClass('groupClass');
echo $this->sxbButtonGroup($buttons)->addButton($this->sxbButton());
?>
Clone this wiki locally