PHPackages                             draw/sonata-extra-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. draw/sonata-extra-bundle

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

draw/sonata-extra-bundle
========================

0.39.5(2mo ago)052.0k↑131.1%2MITPHPPHP &gt;=8.5

Since Oct 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/mpoiriert/sonata-extra-bundle)[ Packagist](https://packagist.org/packages/draw/sonata-extra-bundle)[ RSS](/packages/draw-sonata-extra-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (36)Versions (218)Used By (2)

DrawSonataExtraBundle
=====================

[](#drawsonataextrabundle)

This bundle adds some functionalities to the [Sonata Project](https://sonata-project.org/) different bundle.

Detect admin argument
---------------------

[](#detect-admin-argument)

The current way to define admin argument is that way:

```
App\Sonata\Admin\UserAdmin:
    arguments: [ ~, 'App\Entity\User', ~ ]
```

You can now omit the constructor argument by setting default value in your constructor class:

```
namespace App\Sonata\Admin;

user App\Entity\User;
use Sonata\AdminBundle\Admin\AbstractAdmin;

class UserAdmin extends AbstractAdmin
{
    public function __construct($code, $class = User::class, $baseControllerName = null)
    {
        parent::__construct($code, $class, $baseControllerName);
    }
}
```

A compiler will extract the default value from the argument. They need to have the exact same name to be extracted. If you have defined the arguments from any other mean prior to the compiler pass they will not be replaced.

Fix menu depth when only 1 sub menu
-----------------------------------

[](#fix-menu-depth-when-only-1-sub-menu)

When a menu just have one submenu it can be fix to remove the submenu.

This:

```
User
 --> List
Entity
 --> List
Section
 --> Entity1 List
 --> Entity2 List

```

Would become:

```
User
Entity
Section
 --> Entity1 List
 --> Entity2 List

```

Enable this feature in config:

```
draw_sonata_extra:
  fix_menu_depth: true
```

New Template types
------------------

[](#new-template-types)

Some templates type are added to the default Sonata templates.

By default, all the js and css files are added to the `sonata_admin.assets.extra_javascripts`and `sonata\_admin.assets.extra\_stylesheets section.

If you want to install them manually you can set the `draw_sonata_extra.install_assets` to false.

### Show

[](#show)

#### json

[](#json)

Allow to display a json data based on the .

If you want to import the assets via webpack you must import this:

```
import 'jquery.json-viewer/json-viewer/jquery.json-viewer.js';
import 'jquery.json-viewer/json-viewer/jquery.json-viewer.css';
import '../public/bundles/drawsonataextra/js/json_viewer.js';
```

> **Note**: Don't forget to install the [jquery.json-viewer](https://www.npmjs.com/package/jquery.json-viewer) package.

###  Health Score

56

—

FairBetter than 97% of packages

Maintenance87

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity78

Established project with proven stability

 Bus Factor1

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

Total

216

Last Release

79d ago

PHP version history (5 changes)v0.7.26PHP ^7.3

0.8.0PHP &gt;=7.4

0.9.31PHP &gt;=8.1

0.10.47PHP &gt;=8.2

0.39.0PHP &gt;=8.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/8bb9496b48abc2bfd37ebafa9cc4b3b1307a369ad27f6514943408d9b5ff18a5?d=identicon)[mpoiriert](/maintainers/mpoiriert)

---

Top Contributors

[![mpoiriert](https://avatars.githubusercontent.com/u/4175616?v=4)](https://github.com/mpoiriert "mpoiriert (510 commits)")[![DumitracheAdrian](https://avatars.githubusercontent.com/u/12441524?v=4)](https://github.com/DumitracheAdrian "DumitracheAdrian (9 commits)")[![kiloumap](https://avatars.githubusercontent.com/u/17480546?v=4)](https://github.com/kiloumap "kiloumap (1 commits)")

---

Tags

symfonysonata

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/draw-sonata-extra-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/draw-sonata-extra-bundle/health.svg)](https://phpackages.com/packages/draw-sonata-extra-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[sonata-project/admin-bundle

The missing Symfony Admin Generator

2.2k19.5M315](/packages/sonata-project-admin-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M203](/packages/sulu-sulu)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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