PHPackages                             wodrow/yii2-wwtree - 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. wodrow/yii2-wwtree

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

wodrow/yii2-wwtree
==================

另一款分类树编辑管理工具

1.0.2(6y ago)181MITPHPPHP &gt;=7.1

Since Nov 6Pushed 6y agoCompare

[ Source](https://github.com/wodrow/yii2-wwtree)[ Packagist](https://packagist.org/packages/wodrow/yii2-wwtree)[ RSS](/packages/wodrow-yii2-wwtree/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (5)Versions (4)Used By (0)

yii2-wwtree
===========

[](#yii2-wwtree)

### 使用方式

[](#使用方式)

#### 安装

[](#安装)

```
composer require wodrow/yii2-wwtree dev-master
```

##### 模型

[](#模型)

```
public function behaviors()
{
    return [
        'tree' => [
            'class' => \wodrow\yii2wwtree\TreeBehavior::class,
            'primaryKeyAttribute' => 'your_pk_id_filed_name',
            'parentKeyAttribute' => 'your_parent_id_filed_name',
            'nameKeyAttribute' => 'your_name_filed_name',
            'sortKeyAttribute' => 'your_sort_filed_name',
            'iconKeyAttribute' => 'your_icon_filed_name',
            'iconColorKeyAttribute' => 'your_icon_color_filed_name',
        ],
    ];
}
```

##### 视图

[](#视图)

```
 "your model class",
    // 'custom_field_view' => "@your/extend/view",
    // 'ajaxUrl' => "",
]) ?>
```

### 注意

[](#注意)

```
数据表必须要有id, pid(父级), name, sort, icon, icon_color这六个字段，字段名可以是TreeBehavior配置的字段名;
其他字段根据需要自己添加, 在custom_field_view视图里可以处理添加的字段，使用它生成的模型。

如果使用ajaxUrl，推荐在控制器添加actions

public function actions()
{
    return [
        ...,
        'to-your-ajax-url' => [
            'class' => \wodrow\yii2wwtree\SearchAction::class,
            'searchClass' => TestTree::class,
            'idKeyAttr' => 'your id field key',
            'textKeyAttr' => 'your text field key',
        ],
    ];
}
```

### 截图

[](#截图)

[![kiEcj0.png](https://camo.githubusercontent.com/a10dda8c82d6e51bdd31204498e93af9c019609aec59fbf348435df337b7eaa0/68747470733a2f2f692e6c6f6c692e6e65742f323031392f31312f30362f6a5a687439716f4f7345366d61334c2e6a7067)](https://camo.githubusercontent.com/a10dda8c82d6e51bdd31204498e93af9c019609aec59fbf348435df337b7eaa0/68747470733a2f2f692e6c6f6c692e6e65742f323031392f31312f30362f6a5a687439716f4f7345366d61334c2e6a7067)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

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.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2378d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/919eb56724e4b3e9c2f88ba3d9d9ef817bfaaf47d705cc328b959f1c2f842976?d=identicon)[wodrow](/maintainers/wodrow)

---

Top Contributors

[![wodrow](https://avatars.githubusercontent.com/u/7815635?v=4)](https://github.com/wodrow "wodrow (26 commits)")

---

Tags

treetree-manager

### Embed Badge

![Health badge](/badges/wodrow-yii2-wwtree/health.svg)

```
[![Health](https://phpackages.com/badges/wodrow-yii2-wwtree/health.svg)](https://phpackages.com/packages/wodrow-yii2-wwtree)
```

###  Alternatives

[knplabs/knp-menu

An object oriented menu library

1.4k55.8M287](/packages/knplabs-knp-menu)[cuyz/valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

1.5k9.2M108](/packages/cuyz-valinor)[kartik-v/yii2-tree-manager

An enhanced tree management module with tree node selection and manipulation using nested sets.

156529.0k15](/packages/kartik-v-yii2-tree-manager)[bluem/tree

Library for handling tree structures based on parent IDs

252916.1k7](/packages/bluem-tree)[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

320392.1k17](/packages/codewithdennis-filament-select-tree)[loophp/phptree

An implementation of tree data structure

981.8M2](/packages/loophp-phptree)

PHPackages © 2026

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