Renders a jqTree.js plugin widget., (*1)
Installation
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require forecho/yii2-jqtree "*"
or add, (*4)
"forecho/yii2-jqtree" : "*"
to the require section of your application's composer.json
file., (*5)
Usage
'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, (*6)