From 08e1965930cb1f2b3e9c3a35494a4f1032916863 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Fri, 14 Apr 2023 06:55:20 +0200 Subject: [PATCH] add doc for crud inline_form --- docs/crud/configuration.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/crud/configuration.md b/docs/crud/configuration.md index 9bb4258..4b329e8 100644 --- a/docs/crud/configuration.md +++ b/docs/crud/configuration.md @@ -111,7 +111,6 @@ All fields have these options: | `inline_form` | `null|callable` | `null` | A method to define a form to edit datas | -``` ```php-inline Example #0 $configuration->setField('index', 'My field', TextField::class, [ 'property' => 'myProperty', @@ -120,6 +119,7 @@ $configuration->setField('index', 'My field', TextField::class, [ return $entity->getMyProperty(); }, ]) +``` ```php-inline Example #1 $configuration->setField('index', 'My field', TextField::class, [ @@ -128,6 +128,7 @@ $configuration->setField('index', 'My field', TextField::class, [ return sprintf('%s', $entity->getBar()); }, ]) +``` ```php-inline Example #2 // https://127.0.0.7:8000/admin/my_entity?_sort=property&_sort_direction=asc @@ -139,6 +140,7 @@ $configuration->setField('index', 'My field', TextField::class, [ $query->orderBy('.myProperty', $direction); }], ]) +``` ```php-inline Example #3 use Symfony\Component\Form\FormBuilderInterface;