From ff8832479aa6537def35e681dd22a356c4e475b0 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Mon, 22 Dec 2025 17:50:18 +0100 Subject: [PATCH] feat(crud/configuration): add documentation for setListRowAttributes --- docs/crud/configuration.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/crud/configuration.md b/docs/crud/configuration.md index a06a838..674f8f0 100644 --- a/docs/crud/configuration.md +++ b/docs/crud/configuration.md @@ -291,6 +291,21 @@ class MyEntity implements EntityInterface In order to sort entities, the default property used is `sortOrder`. You can set something else. +## setListRowAttributes + +`setListRowAttributes(string $context, array $attributes)` + +Add attributes on a row (list). + +```php-inline +$configuration->setListRowAttributes('index', [ + 'class' => 'foo', + 'data-foo' => function(Entity $entity) { + return $entity->getFoo(); // A string + }, +]); +``` + ## setBatchAction `setBatchAction(string $context, string $action, string $label, callable $callack)`