PHP code example of shirase55 / yii2-jstree

1. Go to this page and download the library: Download shirase55/yii2-jstree library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

shirase55 / yii2-jstree example snippets


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

<?=  \talma\widgets\JsTree::widget([
    'name' => 'js_tree',
    'core' => [
        'data' => $data
        ...
    ],
    'plugins' => ['types', 'dnd', 'contextmenu', 'wholerow', 'state'],
    ...
]); 

php composer.phar