Skip to content

Commit ebadf0a

Browse files
committed
Activate pretty URLs for custom admin actions
1 parent 0012129 commit ebadf0a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Controller/Dashboard/DashboardRegistryController.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use CodedMonkey\Dirigent\Doctrine\Entity\RegistryPackageMirroring;
77
use CodedMonkey\Dirigent\Doctrine\Repository\RegistryRepository;
88
use CodedMonkey\Dirigent\EasyAdmin\DateIntervalField;
9+
use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminAction;
910
use EasyCorp\Bundle\EasyAdminBundle\Attribute\AdminCrud;
1011
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
1112
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
@@ -86,6 +87,7 @@ public function configureFields(string $pageName): iterable
8687
->onlyOnForms();
8788
}
8889

90+
#[AdminAction(routePath: '/{entityId}/move-up', routeName: 'moveUp')]
8991
public function moveUp(AdminContext $context, RegistryRepository $registryRepository): RedirectResponse
9092
{
9193
$registry = $context->getEntity()->getInstance();
@@ -97,6 +99,7 @@ public function moveUp(AdminContext $context, RegistryRepository $registryReposi
9799
return $this->redirect($url);
98100
}
99101

102+
#[AdminAction(routePath: '/{entityId}/move-down', routeName: 'moveDown')]
100103
public function moveDown(AdminContext $context, RegistryRepository $registryRepository): RedirectResponse
101104
{
102105
$registry = $context->getEntity()->getInstance();

0 commit comments

Comments
 (0)