Customizing Sylius Grids - Improved DX with Grid Mutators

JoliCode - JoliCodeBlog - 16/07
In Sylius, grids handle back-office list rendering: data fetching, column definitions, filters, actions, and more. Sylius E-commerce ships with a large number of ready-to-use grids that can be customized to fit
Cet article est aussi disponible en 🇫🇷 Français : Customiser les grilles Sylius – DX améliorée avec les Grid mutators.

In Sylius, grids handle back-office list rendering: data fetching, column definitions, filters, actions, and more.

Sylius E-commerce ships with a large number of ready-to-use grids that can be customized to fit your project’s needs.

Until now, customization mainly relied on YAML configuration overrides or Grid events. These approaches still work, but they quickly hit their limits when you need to introduce business logic or benefit from a more modern, pleasant API.

With the upcoming release of GridBundle 1.16 — which will be integrated into Sylius 2.3 — a new approach becomes the official solution: Grid mutators. The old methods are now deprecated and will be phased out.

A Grid mutator is a PHP class that modifies an existing grid before it is built. It uses the same GridBuilder as PHP grids, providing a typed, easily ...
[Courte citation de 8% de l'article original]

Loading...