EasyAdminBundle
EasyAdminBundle copied to clipboard
Custom actions route - error in documentation
Describe the bug
In docs there is invalid example of using custom action route.
AdminRoute attribute does not exists.
$context->getEntity() is without proper route attribute.
Currently in docs I see:
use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminRoute;
#[AdminRoute(path: '/invoice', name: 'view_invoice')]
and should be:
use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminAction;
#[AdminAction(routePath: '/invoice', routeName: 'view_invoice')]
https://symfony.com/bundles/EasyAdminBundle/current/actions.html#adding-custom-actions
AdminRoute was introduced in 4.25.0, and replaced the AdminAction and AdminDashboard attributes.