PHPackages                             sgu-infocom-official/yii2-widget-bootstraptreeview - 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. sgu-infocom-official/yii2-widget-bootstraptreeview

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

sgu-infocom-official/yii2-widget-bootstraptreeview
==================================================

Bootstrap Tree View widget wrapper for yii2

01.4kPHP

Since Nov 29Pushed 3y agoCompare

[ Source](https://github.com/SGU-infocom-official/yii2-widget-bootstraptreeview)[ Packagist](https://packagist.org/packages/sgu-infocom-official/yii2-widget-bootstraptreeview)[ RSS](/packages/sgu-infocom-official-yii2-widget-bootstraptreeview/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Bootstrap Tree View widget wrapper for yii2
===========================================

[](#bootstrap-tree-view-widget-wrapper-for-yii2)

[Widget page](https://github.com/patternfly/patternfly-bootstrap-treeview)

[![Bootstrap Tree View Default](https://camo.githubusercontent.com/9cb196be19eabb7c9ea1585b3956d57552126ffb9d0b7dcf9154eebe7f787f77/68747470733a2f2f7261772e6769746875622e636f6d2f6a6f6e6d696c65732f626f6f7473747261702d74726565766965772f6d61737465722f73637265656e73686f742f64656661756c742e504e47)](https://camo.githubusercontent.com/9cb196be19eabb7c9ea1585b3956d57552126ffb9d0b7dcf9154eebe7f787f77/68747470733a2f2f7261772e6769746875622e636f6d2f6a6f6e6d696c65732f626f6f7473747261702d74726565766965772f6d61737465722f73637265656e73686f742f64656661756c742e504e47)

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

[](#installation)

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

### Install

[](#install)

Either run

```
$ composer require sgu-infocom-official/yii2-widget-bootstraptreeview "dev-master"

```

or add

```
"sgu-infocom-official/yii2-widget-bootstraptreeview": "dev-master"

```

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

Simple example
--------------

[](#simple-example)

```
use sguinfocom\widget\TreeView;
use yii\web\JsExpression;

$data = [
    [
        'text' => 'Parent 1',
        'nodes' => [
            [
                'text' => 'Child 1',
                'nodes' => [
                    [
                        'text' => 'Grandchild 1'
                    ],
                    [
                        'text' => 'Grandchild 2'
                    ]
                ]
            ],
            [
                'text' => 'Child 2',
            ]
        ],
    ],
    [
        'text' => 'Parent 2',
    ]
];

$onSelect = new JsExpression( $data,
    'size' => TreeView::SIZE_SMALL,
    'header' => 'Categories',
    'searchOptions' => [
        'inputOptions' => [
            'placeholder' => 'Search category...'
        ],
        'clearButtonOptions' => [
            'title' => 'Clear',
        ],
    ],
    'clientOptions' => [
        'onNodeSelected' => $onSelect,
        'selectedBackColor' => 'rgb(40, 153, 57)',
        'borderColor' => '#fff',
    ],
]);

echo $groupsContent;
```

Pjax navigation example
-----------------------

[](#pjax-navigation-example)

```
use yii\widgets\Pjax;
use yii\web\JsExpression;
use sguinfocom\widget\TreeView;
use yii\helpers\Url;
Pjax::begin([
    'id' => 'pjax-container',
]);

echo \yii::$app->request->get('page');

Pjax::end();

$onSelect = new JsExpression( 'Parent 1',
        'href' => Url::to(['', 'page' => 'parent1']),
        'nodes' => [
            [
                'text' => 'Child 1',
                'href' => Url::to(['', 'page' => 'child1']),
                'nodes' => [
                    [
                        'text' => 'Grandchild 1',
                        'href' => Url::to(['', 'page' => 'grandchild1'])
                    ],
                    [
                        'text' => 'Grandchild 2',
                        'href' => Url::to(['', 'page' => 'grandchild2'])
                    ]
                ]
            ],
        ],
    ],
];

echo TreeView::widget([
    'data' => $items,
    'size' => TreeView::SIZE_SMALL,
    'clientOptions' => [
        'onNodeSelected' => $onSelect,
    ],
]);
```

Changing widget template
------------------------

[](#changing-widget-template)

You can redefine widget template via template option:

```
echo TreeView::widget([
    ...
    'template => TreeView::TEMPLATE_SIMPLE,
    //'template => TreeView::TEMPLATE_ADVANCED //by default
    ...
]);
```

Supported template parts:

KeyDescription{header}'header' configuration widget param{search}Search input{tree}Bootstrap TreeView widget contentLicense
-------

[](#license)

**yii2-widget-bootstraptreeview** is released under the Apache License Version 2.0. See the bundled `LICENSE.md` for details.

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity24

Early-stage or recently created project

 Bus Factor1

Top contributor holds 70% 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/c188d056766f9b617e282fbd647c579da41dc96bf922bbdb3d8226defa5008b3?d=identicon)[Sitnikov-TV](/maintainers/Sitnikov-TV)

---

Top Contributors

[![execut](https://avatars.githubusercontent.com/u/2357407?v=4)](https://github.com/execut "execut (35 commits)")[![Sitnikov-TV](https://avatars.githubusercontent.com/u/86051413?v=4)](https://github.com/Sitnikov-TV "Sitnikov-TV (9 commits)")[![nerburish](https://avatars.githubusercontent.com/u/5610788?v=4)](https://github.com/nerburish "nerburish (3 commits)")[![Disassem](https://avatars.githubusercontent.com/u/11461847?v=4)](https://github.com/Disassem "Disassem (1 commits)")[![lengnuan-v](https://avatars.githubusercontent.com/u/45681358?v=4)](https://github.com/lengnuan-v "lengnuan-v (1 commits)")[![Taroxx](https://avatars.githubusercontent.com/u/9588339?v=4)](https://github.com/Taroxx "Taroxx (1 commits)")

### Embed Badge

![Health badge](/badges/sgu-infocom-official-yii2-widget-bootstraptreeview/health.svg)

```
[![Health](https://phpackages.com/badges/sgu-infocom-official-yii2-widget-bootstraptreeview/health.svg)](https://phpackages.com/packages/sgu-infocom-official-yii2-widget-bootstraptreeview)
```

###  Alternatives

[strictus/strictus

Strict Typing for local variables in PHP

1606.9k](/packages/strictus-strictus)[wodby/wordpress-composer

Project template for WordPress projects with composer

691.1k](/packages/wodby-wordpress-composer)[ollyxar/websockets-chat

Laravel WebSockets Chat

431.1k](/packages/ollyxar-websockets-chat)

PHPackages © 2026

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