Basic operations
In this cookbook, we assume that you have already created a Book resource.
Learn more on how to create a Sylius resource.
List of resources

Create a grid for your resource using Symfony's Maker Bundle.
Note: To ease the setup, it is recommended to have an existing Doctrine Entity configured.
Magic! Here is the generated grid.
Configure the index operation in your resource.
Note: When you are in a Sylius project, the templatesDir path is: @SyliusAdmin/shared/crud
Use the Symfony debug:router command to check the results.
Your route should look like this:
Resource creation page

Create a form type for your resource.
Configure the create operation in your resource.
Note: When you are in a Sylius project, the templatesDir path is: @SyliusAdmin/shared/crud
Use the Symfony debug:router command to check the results.
Your route should look like this:
Resource edition page

Ensure you already created the Symfony form type in the previous section.
Configure the update operation in your resource.
Note: When you are in a Sylius project, the templatesDir path is: @SyliusAdmin/shared/crud
Use the Symfony debug:router command to check the results.
Your route should look like this:
Resource details page

Configure the show operation in your resource.
Note: When you are in a Sylius project, the templatesDir path is: @SyliusAdmin/shared/crud
Use the Symfony debug:router command to check the results.
Your route should look like this:
Now we need to configure the templates.
Note that you can also replace the default title.
Last updated
Was this helpful?
