PHPackages                             umanit/easyadmin-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. [Admin Panels](/categories/admin)
4. /
5. umanit/easyadmin-tree-bundle

ActiveSymfony-bundle[Admin Panels](/categories/admin)

umanit/easyadmin-tree-bundle
============================

Plugin to add category tree features for EasyAdmin

0.0.7(8mo ago)237.0k—0%7[3 PRs](https://github.com/umanit/easyadmin-tree-bundle/pulls)MITPHPPHP ^8.0

Since Oct 28Pushed 8mo ago6 watchersCompare

[ Source](https://github.com/umanit/easyadmin-tree-bundle)[ Packagist](https://packagist.org/packages/umanit/easyadmin-tree-bundle)[ Docs](https://github.com/umanit/easyadmin-tree-bundle)[ RSS](/packages/umanit-easyadmin-tree-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (9)Used By (0)

Umanit EasyAdmin Tree Bundle
============================

[](#umanit-easyadmin-tree-bundle)

Plugin to add category tree features for EasyAdmin

Features
--------

[](#features)

- Display of content's entries as a tree structure on index page
- Filter content's entries through a tree sidebar on index page
- Provide a TreeField to manage tree structures on forms

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

[](#installation)

`$ composer require umanit/easyadmin-tree-bundle`

Configuration
-------------

[](#configuration)

The templates paths needs to be declared in your Twig configuration :

```
twig:
  paths:
    '%kernel.project_dir%/vendor/umanit/easyadmin-tree-bundle/Resources/views': UmanitEasyAdminTreeBundle
```

This bundle relies on StofDoctrineExtensionsBundle, so make sure it is configured properly : [documentation](https://symfony.com/bundles/StofDoctrineExtensionsBundle/current/index.html). You need to :

- add tree extension to your mapping :

```
doctrine:
    orm:
        entity_managers:
            default:
                mappings:
                    gedmo_tree:
                        type: annotation
                        prefix: Gedmo\Tree\Entity
                        dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Tree/Entity"
                        alias: GedmoTree # (optional) it will default to the name set for the mapping
                        is_bundle: false
```

- activate the tree extension :

```
stof_doctrine_extensions:
    default_locale: en_US
    orm:
        default:
            tree: true
```

Usage
-----

[](#usage)

1. [Administer a category tree](#administer-a-category-tree)
2. [Add a tree sidebar](#add-a-tree-sidebar)
3. [Use TreeField in your forms](#use-treefield-in-your-forms)

### Administer a category tree

[](#administer-a-category-tree)

Create you category entity by extending AbstractTreeItem :

```
