PHPackages                             alex290/yii2-treeselect - 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. alex290/yii2-treeselect

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

alex290/yii2-treeselect
=======================

Select Tree Map

1.0.3(8y ago)1612↓100%1GPL-2.0PHP

Since Dec 5Pushed 3y ago2 watchersCompare

[ Source](https://github.com/alex290/yii2-treeselect)[ Packagist](https://packagist.org/packages/alex290/yii2-treeselect)[ RSS](/packages/alex290-yii2-treeselect/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (4)Used By (0)

Select Tree Map - массив из масива с `parent_id`
================================================

[](#select-tree-map---массив-из-масива-с-parent_id)

Установка
---------

[](#установка)

Предпочтительный способ установки этого расширения через [composer](http://getcomposer.org/download/).

Запустить

```
php composer.phar require --prefer-dist alex290/yii2-treeselect "*"

```

или добавить

```
"alex290/yii2-treeselect": "*"

```

в секцию require вашего `composer.json` файла.

Использование
-------------

[](#использование)

После установки расширения, просто использовать его в вашем коде:

```
$map = app\models\Category::find()->indexBy('id')->orderBy('weight')->asArray()->all();

```

Забираем массив из объекта категории где должно быть обязательное поле `parent_id`

Подключаем новую модель

```
$treeSelect = new \alex290\treeselect\TreeSelect();

```

и например в форме выводим

```

```

где `$treeSelect->getTree($map)` Вызывается простой массив \['id объекта' =&gt; 'Название'\]. А дочерние элементы вслед за главным с префиксом '-'

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~14 days

Total

3

Last Release

3051d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/35fd7f2d7b8be6fef06a2c6aee576282f55559098fd5d6075a7fedc80df48f34?d=identicon)[alex290](/maintainers/alex290)

---

Top Contributors

[![alex290](https://avatars.githubusercontent.com/u/13647764?v=4)](https://github.com/alex290 "alex290 (2 commits)")

---

Tags

yii2extension

### Embed Badge

![Health badge](/badges/alex290-yii2-treeselect/health.svg)

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

###  Alternatives

[vyants/yii2-daemon

Extension provides functionality for simple daemons creation and control

7859.0k](/packages/vyants-yii2-daemon)[dmstr/yii2-cookie-consent

Yii2 Cookie Consent Widget

1452.6k](/packages/dmstr-yii2-cookie-consent)[richardfan1126/yii2-js-register

Yii2 widget to register JS into view

1357.2k7](/packages/richardfan1126-yii2-js-register)

PHPackages © 2026

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