This package is abandoned and no longer maintained. No replacement package was suggested.

Sylius grid plugin to help building grids

v0.2.1 2021-09-13 10:51 UTC

This package is auto-updated.

Last update: 2022-04-07 13:06:29 UTC


It's now integrated to Sylius grid bundle 1.11 on beta release.

Sylius Grid Builder

Build your Sylius grids in PHP.


// config/sylius/grids/book.php

use App\Entity\Author;
use App\Entity\Book;
use App\Entity\Nationality;
use SyliusGridBuilder\Field;
use SyliusGridBuilder\Filter;
use SyliusGridBuilder\GridBuilder;
use SyliusGridBuilder\GridConfig;

return static function (GridConfig $grid) {
    $grid->addGrid(GridBuilder::create('app_book', Book::class)
        ->addFilter(Filter::create('title', 'string'))
        ->addFilter(Filter::create('author', 'entity')
                'class' => Author::class,
                'multiple' => true,
        ->addFilter(Filter::create('nationality', 'entity')
                'fields' => ['author.nationality'],
                'class' => Nationality::class,
        ->addFilter(Filter::create('currencyCode', 'string')
                'fields' => ['price.currencyCode'],
        ->addFilter(Filter::create('state', 'select')
                'multiple' => true,
                'choices' => [
                    'initial' => 'initial',
                    'published' => 'published',
                    'unpublished' => 'unpublished',
        ->orderBy('title', 'asc')
        ->addField(Field::create('title', 'string')
        ->addField(Field::create('author', 'string')
            ->setSortable(true, 'author.name')
        ->addField(Field::create('nationality', 'string')
            ->setSortable(true, 'author.nationality.name')
        ->setLimits([10, 5, 15])
        ->addDeleteAction([], 'bulk')

MIT License


Install Sylius grid builder with composer.

  composer require loic425/sylius-grid-builder

Import your PHP configuration files for your grids.

# config/services.yaml
    - { resource: "sylius/grids/**.php" }


Read the whole Sylius grid bundle documentation to see all the options.

Sylius Grid Bundle documentation


Sylius Grid Builder is completely free and released under the MIT License.


Here are some related projects.

Sylius Grid Bundle