forecho / yii2-jqtree
jqTree widget for Yii2.
Package info
Language:JavaScript
Type:yii2-extension
pkg:composer/forecho/yii2-jqtree
0.1.0
2015-01-21 06:18 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2026-02-26 02:16:06 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