PHPackages                             ljuraszek/tree-bundle - 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. [Database &amp; ORM](/categories/database)
4. /
5. ljuraszek/tree-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

ljuraszek/tree-bundle
=====================

This Symfony bundle integrates jsTree and Gedmo Nested Set directly to Sonata Admin

v1.0.1(5y ago)0135MITTwigPHP &gt;=5.6.0

Since Jul 27Pushed 5y agoCompare

[ Source](https://github.com/ljuraszek/sonata-admin-tree-bundle)[ Packagist](https://packagist.org/packages/ljuraszek/tree-bundle)[ RSS](/packages/ljuraszek-tree-bundle/feed)WikiDiscussions master Synced 3d ago

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

sonata-admin-tree-bundle
========================

[](#sonata-admin-tree-bundle)

This bundle integrates [jsTree](https://www.jstree.com/) and [Gedmo Nested Set](https://github.com/stof/StofDoctrineExtensionsBundle) directly to [Sonata Admin](https://sonata-project.org/).

A tree builds itself in an asynchronous way. Hence, it's quite good for big trees.

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

[](#installation)

### Install requirements

[](#install-requirements)

**SonataAdminBundle**
\- the SonataAdminBundle provides an installation article here:

**StofDoctrineExtensionsBundle**
\- then you need to install StofDoctrineExtensionsBundle

**Enable Tree Extension**
\- nested behaviour will implement the standard Nested-Set behaviour on your Entity

### Install TreeBundle

[](#install-treebundle)

Install it via composer

```
composer require redcode/tree-bundle
```

Register the bundle in your app kernel `./app/AppKernel.php`

```
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            ...
            new RedCode\TreeBundle\RedCodeTreeBundle(),
        );
        ...
    }
}
```

Add the following lines to the routing file `./app/config/routing.yml`

```
redcode_tree:
    resource: "@RedCodeTreeBundle/Resources/config/routing.yml"
    prefix:   /admin
```

For the entity with enabled [Gedmo Nested Set](https://github.com/Atlantic18/DoctrineExtensions/blob/master/doc/tree.md) follow these steps:

Extend Admin class from `\RedCode\TreeBundle\Admin\AbstractTreeAdmin`

```
class SubjectAdmin extends AbstractTreeAdmin
{
...
}
```

Extend AdminController from `\RedCode\TreeBundle\Controller\TreeAdminController`

```
class SubjectAdminController extends TreeAdminController
{
...
}
```

When registering the admin as a service, you need to provide a fourth argument - the name of the field that will be shown in the tree.

```
app.admin.subject:
    class: AppBundle\Admin\SubjectAdmin
    arguments: [~, AppBundle\Entity\Subject, AppBundle:SubjectAdmin, 'word']
    tags:
        - {name: sonata.admin, manager_type: orm, group: Search, label: Subject}
```

How it looks like
-----------------

[](#how-it-looks-like)

[![redcode/tree-bundle](https://camo.githubusercontent.com/08b1cb9e6e020b26ecb5f80533d86c6868bbececb22fd5c1e2c8b64f1c670256/687474703a2f2f672e7265636f726469742e636f2f517764627252335039522e676966)](https://camo.githubusercontent.com/08b1cb9e6e020b26ecb5f80533d86c6868bbececb22fd5c1e2c8b64f1c670256/687474703a2f2f672e7265636f726469742e636f2f517764627252335039522e676966)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 63.6% 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 ~869 days

Total

3

Last Release

1839d ago

Major Versions

0.1-alpha → v1.0.02021-04-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/a0a7542cce3096ed4c967c81674b485982b4fb36b795c76ba53797b95365ef50?d=identicon)[ljuraszek](/maintainers/ljuraszek)

---

Top Contributors

[![maZahaca](https://avatars.githubusercontent.com/u/1290067?v=4)](https://github.com/maZahaca "maZahaca (7 commits)")[![Kleinast](https://avatars.githubusercontent.com/u/2306947?v=4)](https://github.com/Kleinast "Kleinast (1 commits)")[![mgrajcarek](https://avatars.githubusercontent.com/u/1970?v=4)](https://github.com/mgrajcarek "mgrajcarek (1 commits)")[![Padam87](https://avatars.githubusercontent.com/u/776488?v=4)](https://github.com/Padam87 "Padam87 (1 commits)")[![RomainSanchez](https://avatars.githubusercontent.com/u/18164227?v=4)](https://github.com/RomainSanchez "RomainSanchez (1 commits)")

---

Tags

asyncasynchronoussymfonybundlenesteddoctrinesettreeajaxsonataproject

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ljuraszek-tree-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ljuraszek-tree-bundle/health.svg)](https://phpackages.com/packages/ljuraszek-tree-bundle)
```

###  Alternatives

[redcode/tree-bundle

This Symfony bundle integrates jsTree and Gedmo Nested Set directly to Sonata Admin

3048.5k](/packages/redcode-tree-bundle)[sonata-project/doctrine-orm-admin-bundle

Integrate Doctrine ORM into the SonataAdminBundle

46117.7M155](/packages/sonata-project-doctrine-orm-admin-bundle)[omines/datatables-bundle

Symfony DataTables Bundle with native Doctrine ORM, Elastica and MongoDB support

2851.4M6](/packages/omines-datatables-bundle)[okapon/doctrine-set-type-bundle

Provides support of MySQL SET type for Doctrine2 in Symfony2 applications.

11159.0k](/packages/okapon-doctrine-set-type-bundle)[prezent/doctrine-translatable-bundle

Integrate the doctrine-translatable extension in Symfony

14698.4k5](/packages/prezent-doctrine-translatable-bundle)

PHPackages © 2026

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