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.40.0(2w ago)052.6k↑116.6%2MITPHPPHP &gt;=8.3

Since Oct 24Pushed 2w 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 2w ago

READMEChangelogDependencies (49)Versions (219)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

58

—

FairBetter than 98% of packages

Maintenance96

Actively maintained with recent releases

Popularity28

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

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

Recently: every ~37 days

Total

217

Last Release

18d ago

PHP version history (6 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

0.40.0PHP &gt;=8.3

### 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 (514 commits)")[![DumitracheAdrian](https://avatars.githubusercontent.com/u/12441524?v=4)](https://github.com/DumitracheAdrian "DumitracheAdrian (11 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

[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.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k6.0M777](/packages/sylius-sylius)[sulu/sulu

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

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

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

3.8k3.9M535](/packages/pimcore-pimcore)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M430](/packages/easycorp-easyadmin-bundle)[contao/core-bundle

Contao Open Source CMS

1301.7M3.1k](/packages/contao-core-bundle)

PHPackages © 2026

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