Search by

survos / ez-bundle

tacman1123

configure EasyAdmin with attributes

Package info

github.com/survos/ez-bundle

Type:symfony-bundle

pkg:composer/survos/ez-bundle

Fund package maintenance!

kbond

Statistics

Installs: 2 105

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

2.45.33 2026-11-08 13:57 UTC

This package is auto-updated.

Last update: 2026-11-08 13:59:13 UTC


README

Lightweight tools that extend EasyAdmin (easycorp/easyadmin-bundle).

Features

  • Event-driven menu slots across desktop/mobile headers, page navigation, actions, sidebar and footer
  • Define default fields via attributes
  • Generate all entity crud controllers via a single command (code-bundle?)
  • Automatic configuration of filters
  • Base controller defaults to read-only for non-admins

Installation

Install the bundle using Composer:

composer require survos/ez-bundle

Menu integration

Requires PHP 8.5, Symfony 8.1+, EasyAdmin 5.9+, Twig 3.29+ and survos/menu-bundle. The bundle registers its slot layout by default. See menu integration for listeners, page context, locale placement and replacing the listing action. KnpMenuBundle still provides the library factory and matcher; it is not removed by this integration.

Usage

use Survos\EzBundle\Attribute\EzAdmin;
use Survos\EzBundle\Attribute\EzField;
use Survos\EzBundle\Attribute\Page;

#[EzAdmin(icon: 'fa-regular fa-image', defaultSort: ['year' => 'DESC'], indexMax: 12)]
class ForteObj
{
    #[EzField(index: true, order: 1, filter: true)]
    public ?int $year = null;

    #[EzField(index: true, order: 2)]
    public ?string $title = null;
}

Testing

Run the test suite:

./vendor/bin/phpunit

License

This bundle is released under the MIT license. See the LICENSE file for details.