PHPackages                             tourze/easy-admin-menu-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. tourze/easy-admin-menu-bundle

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

tourze/easy-admin-menu-bundle
=============================

EasyAdmin 菜单管理组件，提供灵活的菜单配置和管理功能

1.0.1(5mo ago)019.7k20MITPHPCI passing

Since Apr 22Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/tourze/easy-admin-menu-bundle)[ Packagist](https://packagist.org/packages/tourze/easy-admin-menu-bundle)[ RSS](/packages/tourze-easy-admin-menu-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (17)Versions (9)Used By (20)

EasyAdminMenuBundle
===================

[](#easyadminmenubundle)

[English](README.md) | [中文](README.zh-CN.md)

[![PHP Version](https://camo.githubusercontent.com/aa8abac706e2eb2bfc32729d57a37e839e2fd99df9c4ddf8c34520c9f0047650/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f656173792d61646d696e2d6d656e752d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/easy-admin-menu-bundle)[![Latest Version](https://camo.githubusercontent.com/2d796df7e69613a0d78b120fb5cacab92766ee4e5ffdc3dae5f1f8d362c3dff2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f656173792d61646d696e2d6d656e752d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/easy-admin-menu-bundle)[![License](https://camo.githubusercontent.com/4f82b688853e1e68d3bf23cc8d6f17ab243dc87dcf5c2860f6cfd82e04f70950/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f746f75727a652f656173792d61646d696e2d6d656e752d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/easy-admin-menu-bundle)[![Build Status](https://camo.githubusercontent.com/3c75cbf80739d3f42836bab035102123295320544fd5b4157e0fec7fc34b2780/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f7068702d6d6f6e6f7265706f2f63692e796d6c3f6272616e63683d6d6173746572267374796c653d666c61742d737175617265)](https://github.com/tourze/php-monorepo/actions)[![Quality Score](https://camo.githubusercontent.com/43930c8561a14d3f5a68c62b692ee20749bac4c043e09e88fd3fdd611660198f/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f746f75727a652f7068702d6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/php-monorepo)[![Total Downloads](https://camo.githubusercontent.com/477e05ab3125d13127b2c4589edb47ad746a11ac02d036079cb2a59c89b94434/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f656173792d61646d696e2d6d656e752d62756e646c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/easy-admin-menu-bundle)[![Code Coverage](https://camo.githubusercontent.com/fce86ff4532b4694c22512e5e192a270f73dd27d6e5495fffb59c73cf14de807/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f746f75727a652f7068702d6d6f6e6f7265706f2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tourze/php-monorepo)

A Symfony bundle for simplified menu management in EasyAdmin backend systems. This bundle provides easy-to-use tools for organizing menus and generating admin links.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Quick Start](#quick-start)
- [Advanced Usage](#advanced-usage)
- [API Reference](#api-reference)
- [Testing](#testing)
- [Contributing](#contributing)
- [License](#license)

Features
--------

[](#features)

- Simplified menu organization and management
- Attribute-based menu provider registration with `#[MenuProvider]`
- Easy link generation for EasyAdmin CRUD pages
- Entity class extraction from URLs
- Integration with KnpMenuBundle for menu rendering
- Automatic service configuration and DI

Requirements
------------

[](#requirements)

- PHP 8.1 or higher
- Symfony 6.4 or higher
- EasyAdmin Bundle 4.x
- KnpMenuBundle 3.7 or higher

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

[](#installation)

Install the bundle using Composer:

```
composer require tourze/easy-admin-menu-bundle
```

The bundle will be automatically registered if you're using Symfony Flex. Otherwise, add it manually to `config/bundles.php`:

```
// config/bundles.php
return [
    // ...
    Tourze\EasyAdminMenuBundle\EasyAdminMenuBundle::class => ['all' => true],
];
```

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

[](#configuration)

The bundle works out of the box with default configuration. No additional configuration is required for basic usage.

### Custom Menu Factory

[](#custom-menu-factory)

You can customize the menu factory by defining your own service:

```
# config/services.yaml
services:
    easy-admin-menu.factory:
        class: Knp\Menu\MenuFactory
        # Add your custom configuration here
```

Quick Start
-----------

[](#quick-start)

### 1. Create a Menu Provider

[](#1-create-a-menu-provider)

Create a menu provider class and mark it with the `#[MenuProvider]` attribute:

```
