loveorigami/yii2-bootstrap-toggle Yii2 bootstrap-toggle widget

widgetbootstraptoggle

Bootstrap Toggle widget for Yii 2

This extension provides the Bootstrap-toggle integration for the Yii2 framework.

Installation

This extension requires Bootstrap-toggle

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist loveorigami/yii2-bootstrap-toggle "*"

or add

"loveorigami/yii2-bootstrap-toggle": "*"

to the require section of your composer.json.

General Usage

use lo\widgets\Toggle;

Toggle::widget(
    [
        'name' => 'status', // input name. Either 'name', or 'model' and 'attribute' properties must be specified.
        'checked' => true,
        'options' => [], // checkbox options. More data html options [see here](http://www.bootstraptoggle.com)
    ]
)

or with active form as

    <?= $form->field($model, 'status')->widget(Toggle::className(),
        [
            'options' =>[
                'id' => 'my-id',
            ]
        ]
    ); ?>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • 1.112 May 2016
  • 1.013 August 2015

Comments



1.1 is the latest of 2 releases



GPL-3.0+ license
Stats
3 github stars & 6 github forks
75 downloads in the last day
2175 downloads in the last 30 days
18462 total downloads