diff --git a/docs/src/reference/types/column/options/column.md b/docs/src/reference/types/column/options/column.md index 39a26b7b..f1c0e30b 100644 --- a/docs/src/reference/types/column/options/column.md +++ b/docs/src/reference/types/column/options/column.md @@ -51,6 +51,25 @@ Sets the parameters used when translating the column header. Sets the translation domain used when translating the column value. Setting the option to `false` disables its translation. +### `value_translation_parameters` + +Sets the parameters used when translating the column value. + +If given the callable, it will receive two arguments: +- column value, e.g. column (row) data formatted by the optional `formatter` option; +- column (row) data, e.g. value returned by property accessor or getter; + +```php +// Assume the data table of User entities +$builder->addColumn('firstName', options: [ + 'value_translation_parameters' => function (string $firstName, User $user) { + return [...]; + }, +]); +``` + +The `ColumnValueView` will contain the resolved callable. + ### `property_path` - **type**: `null`, `false` or `string`