add doc for crud inline_form
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
08e1965930
commit
8197a238de
1 changed files with 4 additions and 4 deletions
|
|
@ -111,7 +111,7 @@ All fields have these options:
|
|||
| `inline_form` | `null|callable` | `null` | A method to define a form to edit datas |
|
||||
|
||||
|
||||
```php-inline Example #0
|
||||
```php-inline title="Example #0"
|
||||
$configuration->setField('index', 'My field', TextField::class, [
|
||||
'property' => 'myProperty',
|
||||
// OR
|
||||
|
|
@ -121,7 +121,7 @@ $configuration->setField('index', 'My field', TextField::class, [
|
|||
])
|
||||
```
|
||||
|
||||
```php-inline Example #1
|
||||
```php-inline title="Example #1"
|
||||
$configuration->setField('index', 'My field', TextField::class, [
|
||||
'raw' => true,
|
||||
'property_builder' => function($entity, array $options) {
|
||||
|
|
@ -130,7 +130,7 @@ $configuration->setField('index', 'My field', TextField::class, [
|
|||
])
|
||||
```
|
||||
|
||||
```php-inline Example #2
|
||||
```php-inline title="Example #2"
|
||||
// https://127.0.0.7:8000/admin/my_entity?_sort=property&_sort_direction=asc
|
||||
$configuration->setField('index', 'My field', TextField::class, [
|
||||
'property' => 'myProperty'
|
||||
|
|
@ -142,7 +142,7 @@ $configuration->setField('index', 'My field', TextField::class, [
|
|||
])
|
||||
```
|
||||
|
||||
```php-inline Example #3
|
||||
```php-inline title="Example #3"
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue