mrmuminov / yii2-combo-tree
Yii2 Combo Tree Select Extension
Package info
github.com/MrMuminov/yii2-combo-tree
Language:JavaScript
Type:yii2-extension
pkg:composer/mrmuminov/yii2-combo-tree
1.0.8
2022-04-10 13:16 UTC
Requires
- php: >=7.0.0
- yiisoft/yii2: ~2.0.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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, ], ]); ?>

