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

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

<?php
echo $this->sxbButtonToolbar($arrayButtonGroups);
?>

Explicit usage

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

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

$buttonGroups = array(
    $this->sxbButtonGroup($buttons),
    $this->sxbButtonGroup($buttons),
);

echo $this->sxbButtonToolbar($buttonGroups);
?>

Content types

<?php
// addClass, addGroup
echo $this->sxbButtonToolbar($buttonGroups)->addClass('toolbarClass');
echo $this->sxbButtonToolbar($buttonGroups)->addGroup($this->sxbGroup());
?>
Clone this wiki locally