vova07/yii2-select2-widget
最新稳定版本:0.1.2
Composer 安装命令:
composer require vova07/yii2-select2-widget
包简介
The select2 widget for Yii framework.
README 文档
README
Select2 widget is a wrapper of Select2 for Yii 2 framework.
Install
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist vova07/yii2-select2-widget "*"
or add
"vova07/yii2-select2-widget": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by:
use vova07\select2\Widget; echo $form->field($model, 'field')->widget(Widget::className(), [ 'options' => [ 'multiple' => true, 'placeholder' => 'Choose item' ], 'settings' => [ 'width' => '100%', ], 'items' => [ 'item1', 'item2', ... ], 'events' => [ 'select2-open' => 'function (e) { log("select2:open", e); }', 'select2-close' => new JsExpression('function (e) { log("select2:close", e); }') ... ] ]);
Testing
$ phpunit
Further Information
Please, check the Select2 documentation for further information about its configuration options.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The BSD License (BSD). Please see License File for more information.
统计信息
- 总下载量: 94.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 9
- 点击次数: 1
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-07-13