Skip to content

Commit c0ead98

Browse files
committed
MrYamous changes
1 parent ab4ac88 commit c0ead98

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doctrine.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ In this case we have to return to MapEntiy::
909909
#[Route('/document/{slugCategory}/{id}-{slugDocument}')]
910910
public function showDocument(
911911
#[MapEntity(mapping: ['slugCategory' => 'slug'])]
912-
Category $category
912+
Category $category,
913913
#[MapEntity(mapping: ['id' => 'id', 'slugDocument' => 'slug'])]
914914
Document $document,
915915
): Response
@@ -931,7 +931,9 @@ When adding route parameters, you can now define the mapping between the route p
931931
// $category = $categoryRepository->findOneBy(['slug' => 'the slug category']);
932932
}
933933

934-
In this case, _route_mapping keys will be slugCategory and slugDocument, and used by path twig option::
934+
In this case, _route_mapping keys will be slugCategory and slugDocument, and used by path twig option.
935+
936+
.. code-block:: twig
935937
936938
{{ path('showDocument', {slugCategory: 'invoices', id: 25, slugDocument: 'invoice_CFD025125'}) }}
937939

0 commit comments

Comments
 (0)