mrmuminov / yii2-combo-tree
Yii2 Combo Tree Select Extension
Installs: 29
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Language:JavaScript
Type:yii2-extension
Requires
- php: >=7.0.0
- yiisoft/yii2: ~2.0.0
README
Yii2 Combo Tree Select Extension
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist mrmuminov/yii2-combo-tree "*"
or add
"mrmuminov/yii2-combo-tree": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, simply use it in your code by :
<?= \MrMuminov\ComboTree\ComboTree::widget([ 'source' => [ [ 'id' => 1, 'title' => 'choice 1', ], [ 'id' => 2, 'title' => 'choice 2', ], [ 'id' => 3, 'title' => 'choice 2 1', 'parent_id' => 2, ], [ 'id' => 4, 'title' => 'choice 2 2', 'parent_id' => 2, ], [ 'id' => 5, 'title' => 'choice 2 3', 'parent_id' => 2, ], [ 'id' => 6, 'title' => 'choice 3', ], ], 'pluginOptions' => [ 'cascadeSelect' => false, ], ]); ?>