PHPackages                             sitronik/yii2-tree-menu - 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. sitronik/yii2-tree-menu

ActiveYii2-extension

sitronik/yii2-tree-menu
=======================

Tree menu for yii2 framework

2397PHP

Since Jun 27Pushed 8y ago1 watchersCompare

[ Source](https://github.com/Sitronik/yii2-tree-menu)[ Packagist](https://packagist.org/packages/sitronik/yii2-tree-menu)[ RSS](/packages/sitronik-yii2-tree-menu/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-tree-menu
==============

[](#yii2-tree-menu)

[![Treemenu](/screenshots/02.png?raw=true)](/screenshots/02.png?raw=true)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ php composer.phar require sitronik/yii2-tree-menu "@dev"

```

or add

```
"sitronik/yii2-tree-menu": "@dev"

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#usage)

### Step 1: Prepare Database

[](#step-1-prepare-database)

Create your database table to store the tree structure. You can do it in this way:

#### Run DB Migrations

[](#run-db-migrations)

You can run the migrations script provided to create the database structure from your yii programming console:

```
php yii migrate/up --migrationPath=@vendor/sitronik/yii2-tree-menu/migrations

```

### Step 2: Setup Module

[](#step-2-setup-module)

Configure the module named `treemenu` in the modules section of your Yii configuration file.

```
'modules' => [
   'treemenu' =>  [
        'class' => 'sitronik\treemenu\Module',
    ]
]
```

### Step 3: Using Tree Widget

[](#step-3-using-tree-widget)

In your view files, you can now use the tree widget directly to manage tree data as shown below:

```
echo sitronik\treemenu\Tree::widget();
```

### Step 4: Manage Tree Widget

[](#step-4-manage-tree-widget)

Go to `/treemenu` and manage your tree

[![Manage Tree](/screenshots/01.png?raw=true)](/screenshots/01.png?raw=true)

License
-------

[](#license)

**yii2-tree-menu** is released under the BSD 3-Clause License. See the bundled `LICENSE.md` for details.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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/31a1c0f90617ef13b29fefece7eb6c45e98ff98f8fe93924015c205130551af9?d=identicon)[sitronik](/maintainers/sitronik)

### Embed Badge

![Health badge](/badges/sitronik-yii2-tree-menu/health.svg)

```
[![Health](https://phpackages.com/badges/sitronik-yii2-tree-menu/health.svg)](https://phpackages.com/packages/sitronik-yii2-tree-menu)
```

PHPackages © 2026

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