iutbay/yii2-jstree JsTree for Yii2

extensionjstree

JsTree for Yii2

JsTree for Yii2.

WIP...

Installation

The preferred way to install this helper is through composer.

Either run

php composer.phar require "iutbay/yii2-jstree" "*"

or add

"iutbay/yii2-jstree" : "*"

to the require section of your application's composer.json file.

https://packagist.org/packages/iutbay/yii2-jstree

Usage

With model and ActiveForm :

<?= $form->field($model, 'test')->widget(\iutbay\yii2jstree\JsTree::className(), [
    'items' => [
        [
            'id' => 1,
            'text' => 'Test 1',
            'children' => [
                [
                    'id' => 2,
                    'text' => 'Test 2',
                ],
            ],
        ],
        [
            'id' => 3,
            'text' => 'Test 3',
            'icon' => 'fa fa-file', // font awesome icon
        ],
    ],
]) ?>

Without model :

<?= \iutbay\yii2jstree\JsTree::widget([
    'name' => 'test',
    'value' => '1,2',
    'items' => [
        [
            'id' => 1,
            'text' => 'Test 1',
            'children' => [
                [
                    'id' => 2,
                    'text' => 'Test 2',
                ],
            ],
        ],
        [
            'id' => 3,
            'text' => 'Test 3',
            'icon' => 'fa fa-file', // font awesome icon
        ],
    ],
]) ?>

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

  • v0.128 December 2014

Comments



v0.1 is the latest of one release



Unknown license
Stats
2 github stars & 0 github forks
0 downloads in the last day
5 downloads in the last 30 days
388 total downloads