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

ActiveSymfony-bundle

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

0.39.2(2mo ago)047.5k↑118.4%2MITPHPPHP &gt;=8.5

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

READMEChangelogDependencies (24)Versions (215)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 98% of packages

Maintenance86

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 98.3% 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

213

Last Release

77d 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 (8 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

[sonata-project/admin-bundle

The missing Symfony Admin Generator

2.1k19.0M299](/packages/sonata-project-admin-bundle)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[artgris/filemanager-bundle

FileManager is a simple Multilingual File Manager Bundle for Symfony

182420.8k9](/packages/artgris-filemanager-bundle)[open-dxp/opendxp

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

7310.3k29](/packages/open-dxp-opendxp)[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.

1022.4k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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