forecho / yii2-jqtree
jqTree widget for Yii2.
Installs: 89
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 5
Forks: 1
Open Issues: 0
Language:JavaScript
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-25 23:39:40 UTC
README
Renders a jqTree.js plugin widget.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require forecho/yii2-jqtree "*"
or add
"forecho/yii2-jqtree" : "*"
to the require section of your application's composer.json
file.
Usage
<?php use forecho\jqtree\JQTree; $dataTree = [ [ 'label' => 'node1', 'children' => array( ['label' => 'child1'], ['label' => 'child2'], ), ], ['label' => 'node2'], ]; echo JQTree::widget([ 'id' => 'treeview', 'data' => $dataTree, 'dragAndDrop' => true, 'selectable' => true, 'saveState' => true, 'autoOpen' => true, 'htmlOptions' => ['class' => 'treeview-red'] ]) ?>
GetâYii Web development has never been so fun! www.getyii.com