Beispiel #1
0
?>
                                            
                                            <?php 
echo ButtonDropdown::widget(['label' => 'Action', 'split' => true, 'options' => ['class' => 'btn-info btn-flat'], 'dropdown' => ['items' => [['label' => 'Action', 'url' => '#'], ['label' => 'Another action', 'url' => '#'], ['label' => 'Something else here', 'url' => '#'], ['divider' => true], ['label' => 'Separated link', 'url' => '#']]]]);
?>
                                        
                                        <?php 
echo ButtonDropdown::widget(['label' => 'Action', 'split' => true, 'options' => ['class' => 'btn-danger btn-flat'], 'dropdown' => ['items' => [['label' => 'Action', 'url' => '#'], ['label' => 'Another action', 'url' => '#'], ['label' => 'Something else here', 'url' => '#'], ['divider' => true], ['label' => 'Separated link', 'url' => '#']]]]);
?>
                                        
                                        <?php 
echo ButtonDropdown::widget(['label' => 'Action', 'split' => true, 'options' => ['class' => 'btn-success btn-flat'], 'dropdown' => ['items' => [['label' => 'Action', 'url' => '#'], ['label' => 'Another action', 'url' => '#'], ['label' => 'Something else here', 'url' => '#'], ['divider' => true], ['label' => 'Separated link', 'url' => '#']]]]);
?>
                                        
                                        <?php 
echo ButtonDropdown::widget(['label' => 'Action', 'split' => true, 'options' => ['class' => 'btn-warning btn-flat'], 'dropdown' => ['items' => [['label' => 'Action', 'url' => '#'], ['label' => 'Another action', 'url' => '#'], ['label' => 'Something else here', 'url' => '#'], ['divider' => true], ['label' => 'Separated link', 'url' => '#']]]]);
?>
                                    </div>
                                </div><!-- /.box-body -->
                            </div><!-- end split buttons box -->

                            <!-- social buttons -->
                            <div class="box">
                                <div class="box-header">
                                    <h3 class="box-title">Social Buttons (By <a href="https://github.com/lipis/bootstrap-social">Lipis</a>)</h3>
                                </div>
                                <div class="box-body">
                                    <a class="btn btn-block btn-social btn-bitbucket">
                                        <i class="fa fa-bitbucket"></i> Sign in with Bitbucket
                                    </a>
                                    <a class="btn btn-block btn-social btn-dropbox">
Beispiel #2
0
 /**
  * Generates the buttons that compound the group as specified on [[buttons]].
  * @return string the rendering result.
  */
 protected function renderButtons()
 {
     $buttons = [];
     foreach ($this->buttons as $button) {
         if (is_array($button)) {
             if (isset($button['dropdown'])) {
                 $option = array_merge($button['dropdown'], ['view' => $this->getView()]);
                 $buttons[] = ButtonDropdown::widget($option);
             } else {
                 $label = ArrayHelper::getValue($button, 'label');
                 $options = ArrayHelper::getValue($button, 'options');
                 $buttons[] = Button::widget(['label' => $label, 'options' => $options, 'encodeLabel' => $this->encodeLabels, 'view' => $this->getView()]);
             }
         } else {
             $buttons[] = $button;
         }
     }
     return implode("\n", $buttons);
 }