jeki-aka-zer0/yii2-nsjqtree

Tree built using Nested Sets and jqTree.

dev-master / 1.0.x-dev 2018-10-02 13:10 UTC

This package is auto-updated.

Last update: 2025-04-29 00:34:16 UTC


README

Renders a nested tree with a jqTree.js plugin widget.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require jeki-aka-zer0/yii2-nsjqtree "1.0.x-dev"

or add

"jeki-aka-zer0/yii2-nsjqtree" : "1.0.x-dev"

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

Configuring

class CategoryController extends Controller
{
    public function actions()
    {
        return [
            'dnd' => [
                'class' => jekiakazer0\nsjqtree\src\actions\DndAction::class,
            ],
        ];
    }
}

Usage

<?php

echo jekiakazer0\nsjqtree\src\Tree::widget([
    'modelName' => Category::class,
]);