Creating a custom Field Type
There are certain cases when built-in field types are not enough. Sylius Grids make it easy to define new types.
All you need to do is create your own class implementing FieldTypeInterface and register it as a service.
src/Grid/FieldType.php
That is all. Now register your new field type as a service.
config/services.yaml
Now you can use your new column type in the grid configuration!
config/packages/sylius_grid.yaml
Last updated