oakcms / yii2-bootstrap-switch
This package is abandoned and no longer maintained.
No replacement package was suggested.
Renders a Bootstrap Toggle Switch plugin widget.
Package info
github.com/oakcms/yii2-bootstrap-switch
Type:yii2-extension
pkg:composer/oakcms/yii2-bootstrap-switch
v1.0.0
2016-06-01 14:47 UTC
Requires
- bower-asset/bootstrap-switch: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-02-24 15:03:49 UTC
README
Renders a Bootstrap Toggle Switch plugin widget.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist oakcms/yii2-bootstrap-switch "*"
or add
"oakcms/yii2-bootstrap-switch": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?= $form->field($model, 'field')->widget(\oakcms\bootstrapswitch\Switcher::className()) ?>
Or
<?= \oakcms\bootstrapswitch\Switcher::widget([ 'name' => 'Name', 'checked' => true, 'clientOptions' => [ 'size' => 'large', 'onColor' => 'success', 'offColor' => 'danger' ] ]); ?>