panix/wgt-jstree

Widget JsTree

Installs: 164

Dependents: 4

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:pixelion-component

dev-master 2021-03-03 06:42 UTC

This package is auto-updated.

Last update: 2021-05-31 00:30:12 UTC


README

Widget for Yii Framework 2.0 to use JsTree

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

php composer require --prefer-dist panix/wgt-jstree "*"

or add

"panix/wgt-jstree": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \panix\ext\jstree\JsTree::widget([
    'attribute' => 'attribute_name',
    'model' => $model,
    'core' => [
        'data' => $data
        //...
    ],
    'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
    //...
]); ?>
<?= \panix\ext\jstree\JsTree::widget([
    'core' => [
        'data' => $data
        //...
    ],
    'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
    //...
]); ?>