panix/wgt-jstree

Widget JsTree

Installs: 283

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:pixelion-component

1.0.0 2021-03-03 06:42 UTC

This package is auto-updated.

Last update: 2024-11-07 15:21:03 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'],
    //...
]); ?>