2017 © Pedro Peláez
 

yii2-extension yii2bootstrap4

Yii2 Bootstrap 4 widgets

image

digitv/yii2bootstrap4

Yii2 Bootstrap 4 widgets

  • Wednesday, May 16, 2018
  • by digitv
  • Repository
  • 2 Watchers
  • 11 Stars
  • 335 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 4 Versions
  • 49 % Grown

The README.md

, (*1)

Yii2 bootstrap widgets on Bootstrap 4

Those are ported and partially changed yiisoft/yii2-bootstrap widgets to use with Bootstrap v4., (*2)

It is using twbs/bootstrap package with Bootstrap v4 CSS/JS., (*3)

Use it similarly to yiisoft/yii2-bootstrap package., (*4)

Please feel free to create a issue / pull request if I forgot something or if you find some bugs., (*5)

yiisoft/yii2-bootstrap digitv/yii2bootstrap4
yii\bootstrap\Html digitv\bootstrap\Html
...\ActiveForm ...\ActiveForm
...\ActiveField ...\ActiveField
yii\widgets\Breadcrumbs ...\widgets\Breadcrumbs
* new card widget ...\widgets\Card
...\Alert ...\widgets\Alert
...\Button ...\widgets\Button
...\ButtonDropdown ...\widgets\ButtonDropdown
...\Carousel ...\widgets\Carousel
...\Collapse ...\widgets\Collapse
...\Dropdown ...\widgets\Dropdown
...\Modal ...\widgets\Modal
...\Nav ...\widgets\Nav
...\Navbar ...\widgets\Navbar
...\Progress ...\widgets\Progress
...\Tabs ...\widgets\Tabs
...\ToggleButtonGroup ...\widgets\ToggleButtonGroup

Examples:, (*6)

<?= digitv\bootstrap\widgets\Progress::widget(['percent' => 60, 'label' => 'Test label']) ?>
//Breadcrumbs in layout view
<?= digitv\bootstrap\widgets\Breadcrumbs::widget([
    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>
<?php
//Navbar in layout view
    digitv\bootstrap\widgets\NavBar::begin([
        'brandLabel' => Yii::$app->name,
        'brandUrl' => Yii::$app->homeUrl,
        'options' => [
            'class' => 'navbar-dark bg-dark navbar-expand-lg fixed-top',
        ],
    ]);
    $menuItems = [
        ['label' => 'Home', 'url' => ['/site/index']],
        ['label' => 'Dropdown', 'url' => ['/site/index'], 'items' => [
            ['label' => 'First', 'url' => ['/site/index']],
            ['label' => 'Second', 'url' => '/'],
        ]],
        ['label' => 'About', 'url' => ['/site/about']],
        ['label' => 'Contact', 'url' => ['/site/contact']],
    ];
    if (Yii::$app->user->isGuest) {
        $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']];
        $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']];
    } else {
        $menuItems[] = '<li>'
            . digitv\bootstrap\Html::beginForm(['/site/logout'], 'post')
            . digitv\bootstrap\Html::submitButton(
                'Logout (' . Yii::$app->user->identity->username . ')',
                ['class' => 'btn btn-link logout']
            )
            . digitv\bootstrap\Html::endForm()
            . '</li>';
    }
    echo digitv\bootstrap\widgets\Nav::widget([
        'options' => ['class' => 'navbar-nav ml-auto'],
        'items' => $menuItems,
    ]);
    digitv\bootstrap\widgets\NavBar::end();
?>

The Versions

16/05 2018

dev-master

9999999-dev

Yii2 Bootstrap 4 widgets

  Sources   Download

Apache-2.0

The Requires

 

by Digit

yii2 bootstrap bootstrap 4 yii2 bootstrap4 yii2 bootstrap 4

15/02 2018

1.1.1

1.1.1.0

Yii2 Bootstrap 4 widgets

  Sources   Download

Apache-2.0

The Requires

 

by Digit

yii2 bootstrap bootstrap 4 yii2 bootstrap4 yii2 bootstrap 4

14/02 2018

1.1.0

1.1.0.0

Yii2 Bootstrap 4 widgets

  Sources   Download

Apache-2.0

The Requires

 

by Digit

yii2 bootstrap bootstrap 4 yii2 bootstrap4 yii2 bootstrap 4

13/02 2018

1.0.0

1.0.0.0

Yii2 Bootstrap 4 widgets

  Sources   Download

Apache-2.0

The Requires

 

by Digit

yii2 bootstrap bootstrap 4 yii2 bootstrap4 yii2 bootstrap 4