PHPackages                             andkon/yii2dynatree - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. andkon/yii2dynatree

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

andkon/yii2dynatree
===================

Tree widget for Yii2

15.0k1JavaScript

Since Sep 10Pushed 9y ago1 watchersCompare

[ Source](https://github.com/andkon13/yii2dynatree)[ Packagist](https://packagist.org/packages/andkon/yii2dynatree)[ RSS](/packages/andkon-yii2dynatree/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (2)Used By (0)

yii2dynatree
============

[](#yii2dynatree)

```
docs:
    http://wwwendt.de/tech/dynatree/
demo:
    http://andkon.bl.ee/index.php?r=store

install:

php composer.phar require "andkon/yii2dynatree": "dev-master"

Как использовать/How to use

Model:
need attributes:
    id - primary key
    parent_id - FK to id
    sort - INT order in tree
    name - STRING as label
you can override the field names
attribs
$pkField
$parentField
$sortField

Controller:
class UnitController extends Controller
{
    ...
    public function actions()
    {
        $actions               = parent::actions();
        $actions['moveintree'] = 'andkon\yii2dynatree\actions\MoveInTree';

        // or
        $actions['moveintree'] = [
            'class' => andkon\yii2dynatree\actions\MoveInTree',
            'sortField' => 'order', // override field name
        ];

        return $actions;
    }
    ...
}

Widget:
class Tree extends \andkon\yii2dynatree\Tree
{
    public function init()
    {
        parent::init();
        $this->functions['onClick'] = 'function (node, event) {
            unit.showDetal(node.data.key);
        }';
    }
}

View:
echo \app\pathToWidget\Tree::widget(
    [
        'id'      => 'treeId',
        'isAjax'  => true, // true for use ajax load widget (in dialog|popup etc.) or false for standart render
        'ajaxUrl' => Yii::$app->getUrlManager()->createUrl('/pathToController/moveintree'),
        'model'   => $model,
    ]
);
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/23a468afa49a7228aaef2e563bb572f676599d9a5a6ded8606887056dce9d0ce?d=identicon)[andkon13](/maintainers/andkon13)

---

Top Contributors

[![andkon13](https://avatars.githubusercontent.com/u/4748164?v=4)](https://github.com/andkon13 "andkon13 (6 commits)")

---

Tags

jsphptreeyii

### Embed Badge

![Health badge](/badges/andkon-yii2dynatree/health.svg)

```
[![Health](https://phpackages.com/badges/andkon-yii2dynatree/health.svg)](https://phpackages.com/packages/andkon-yii2dynatree)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
