Search by

janalis / easyadmin-embedded-list

phcorp

Embedded lists for EasyAdmin forms: show a related entity's own CRUD index, paginated, sortable and filterable, inside an edit form.

Package info

github.com/janalis/easyadmin-embedded-list

Type:symfony-bundle

pkg:composer/janalis/easyadmin-embedded-list

Statistics

Installs: 14

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-11-02 18:26 UTC

This package is auto-updated.

Last update: 2026-11-02 18:27:26 UTC


README

easyadmin-embedded-list

easyadmin-embedded-list

Lists inside EasyAdmin forms.
A related entity's own CRUD index · paginated, sorted, with its row actions · upstream EasyAdmin, no fork

CI Docs Latest release Packagist MIT license

Documentation · Getting started · Configuration · JavaScript events

janalis/easyadmin-embedded-list is a Symfony bundle that shows a collection of the entity being edited, in an EasyAdmin form, as the index page of the collection's own CRUD controller: editing an author, you see and manage their books as the book index shows them.

  • The target's own index: its columns, sorting, pagination and row actions, filtered on the edited entity, loaded into the form and kept there as you page and sort.
  • Mapped or computed collections: a Doctrine collection finds its CRUD controller and filter from the mapping; a computed one names them.
  • Row actions in place: a confirmed delete runs without leaving the form and reloads the list; a cancelled confirmation of the page never runs with it.
  • No session lock: each list releases the session as soon as the user is loaded, so the lists of a page load side by side.
  • Configurable: the fragment header and layout, the field's template and columns, filters and batch actions in lists, in-place actions, the session handling.

Install

composer require janalis/easyadmin-embedded-list

Requires PHP 8.4+, Symfony 7.4 or 8, EasyAdmin 5.6+, Doctrine ORM 3 and AssetMapper.

Quick start

The target CRUD controller filters on the association back to the edited entity:

final class BookCrudController extends AbstractCrudController
{
    public function configureFilters(Filters $filters): Filters
    {
        return $filters->add(EntityFilter::new('author'));
    }
}

The edited entity's CRUD controller shows the collection:

use Janalis\EasyAdminEmbeddedList\Field\EmbeddedListField;

final class AuthorCrudController extends AbstractCrudController
{
    public function configureFields(string $pageName): iterable
    {
        yield TextField::new('name');
        yield EmbeddedListField::new('books', 'Books');
        // A collection Doctrine does not map names its CRUD controller and filter.
        yield EmbeddedListField::new('reviews', 'Reviews')
            ->setEmbeddedController(ReviewCrudController::class, 'author')
            ->setVirtual(true);
    }
}

Configuration

Every option has a default; see Configuration.

easyadmin_embedded_list:
    fragment: { header: X-EA-Fragment, filters: false, batch_actions: false }
    field: { columns: 'col-md-7 col-xxl-6' }
    inline_actions: true
    session: true

Contributing

make install
make verify

See CONTRIBUTING.md and the contributor guide.

License

MIT.