EasyAdminBundle icon indicating copy to clipboard operation
EasyAdminBundle copied to clipboard

Add callable argument to Action::setHtmlAttributes

Open ucscode opened this issue 10 months ago • 0 comments

Short description of what this feature will allow to do:

This will allow configuration of an action's html attributes based on it's associated entity

Example of how to use this feature

Action::new('myAction')
    ->setHtmlAttributes(function($entity): array {
        return [
            'data-name' => $entity->getName(),
            // ...
        ];
    });

ucscode avatar Mar 31 '25 14:03 ucscode