update doc about fields
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Simon Vieille 2023-08-11 17:24:55 +02:00
parent f2ba285349
commit ced292d93e
Signed by: deblan
GPG key ID: 579388D585F70417

View file

@ -98,17 +98,18 @@ $configuration->setField('index', 'Title', Field\TextField::class, [
All fields have these options:
| Option | Type | Default | Description |
| ------ | ---- | ------- | ----------- |
| `property` | `string` | `null` | Entity's property to display |
| `property__builder` | `callable` | `null` | A callable data and used to generate the content displayed |
| `view` | `string` | `@Core/admin/crud/field/text.html.twig` | The templated rendered |
| `action` | `string` | `null` | An action to perform on click (`null`, `edit`, `view`) |
| `raw` | `boolean` | `false` | Render as HTML |
| `sort` | `array|callable` | `null` | Defines how to sort |
| `href` | `string|callable` | `null` | Data to generate a link |
| `href_attr` | `array|callable` | `null` | Attributes of the link |
| `inline_form` | `null|callable` | `null` | A method to define a form to edit datas |
| Option | Type | Default | Description |
| ------ | ---- | ------- | ----------- |
| `property` | `string` | `null` | Entity's property to display |
| `property__builder` | `callable` | `null` | A callable data and used to generate the content displayed |
| `view` | `string` | `@Core/admin/crud/field/text.html.twig` | The templated rendered |
| `default_value` | `string` | `null` | Default value |
| `action` | `string` | `null` | An action to perform on click (`null`, `edit`, `view`) |
| `raw` | `boolean` | `false` | Render as HTML |
| `sort` | `array | callable` | `null` | Defines how to sort |
| `href` | `string | callable` | `null` | Data to generate a link |
| `href_attr` | `array | callable` | `null` | Attributes of the link |
| `inline_form` | `null | callable` | `null` | A method to define a form to edit datas |
```php-inline title="Example #0"
@ -208,9 +209,10 @@ $configuration->setField('index', 'My field', TextField::class, [
`App\Core\Crud\Field\BooleanField`
| Option | Type | Default | Description |
| ------ | ---- | ------- | ----------- |
| `view` | `string` | `@Core/admin/crud/field/boolean.html.twig` | The templated rendered |
| Option | Type | Default | Description |
| ------ | ---- | ------- | ----------- |
| `view` | `string` | `@Core/admin/crud/field/boolean.html.twig` | The templated rendered |
| `display` | `string` | `toggle` | Type of render (`toggle` or `checkbox`) |
## setMaxPerPage