yii2-extension yii2-lcswitch
LC Switch extension for Yii2
drexlerux/yii2-lcswitch
LC Switch extension for Yii2
- Thursday, September 7, 2017
- by drexlerux
- Repository
- 0 Watchers
- 0 Stars
- 46 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 3 Versions
- 12 % Grown
LC Switch
LC Switch extension for Yii2, (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist drexlerux/yii2-lcswitch "*"
or add, (*4)
"drexlerux/yii2-lcswitch": "*"
to the require section of your composer.json
file., (*5)
Usage
- Namespace to use widget class
php
use drexlerux\lcswitch\LcSwitch;
- Once the extension is installed, simply use it in your code by :
php
<?= $form->field($model, 'attribute')->widget(LcSwitch::classname(), [
'options'=>[
'on_text' => Yii::t('app', 'Yes'), // Default value
'of_text' => Yii::t('app', 'No'), // Default value
'width' => '100px'
],
'events' => [
'lcs-init' => "function(input){}"
'lcs-statuschange' => 'function(){}',
'lcs-on' => 'function(){}',
'lcs-off' => 'function(){}',
]
]); ?>
dev-master
9999999-dev
LC Switch extension for Yii2
Sources
Download
MIT
The Requires
by
Carlos Porras
extension
yii2
widget
1.1.0
1.1.0.0
LC Switch extension for Yii2
Sources
Download
MIT
The Requires
by
Carlos Porras
extension
yii2
widget
1.0.0
1.0.0.0
LC Switch extension for Yii2
Sources
Download
MIT
The Requires
by
Carlos Porras
extension
yii2
widget