fix routes in the global settings controller
This commit is contained in:
parent
0dadc670d9
commit
f7eb5b0b49
|
@ -1,5 +1,8 @@
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
* fix routes in the global settings controller
|
||||||
|
|
||||||
## [1.20.0] - 2023-07-27
|
## [1.20.0] - 2023-07-27
|
||||||
### Added
|
### Added
|
||||||
* enable double click on cruds
|
* enable double click on cruds
|
||||||
|
|
|
@ -12,14 +12,10 @@ use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
/**
|
#[Route(path: '/admin/setting')]
|
||||||
* @Route("/admin/setting")
|
|
||||||
*/
|
|
||||||
class SettingAdminController extends AdminController
|
class SettingAdminController extends AdminController
|
||||||
{
|
{
|
||||||
/**
|
#[Route(path: '/{page}', name: 'admin_setting_index', requirements: ['page' => '\d+'])]
|
||||||
* @Route("/{page}", name="admin_setting_index", requirements={"page": "\d+"})
|
|
||||||
*/
|
|
||||||
public function index(
|
public function index(
|
||||||
RepositoryQuery $query,
|
RepositoryQuery $query,
|
||||||
EventDispatcherInterface $eventDispatcher,
|
EventDispatcherInterface $eventDispatcher,
|
||||||
|
@ -38,9 +34,7 @@ class SettingAdminController extends AdminController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[Route(path: '/edit/{entity}', name: 'admin_setting_edit')]
|
||||||
* @Route("/edit/{entity}", name="admin_setting_edit")
|
|
||||||
*/
|
|
||||||
public function edit(
|
public function edit(
|
||||||
Entity $entity,
|
Entity $entity,
|
||||||
EntityManager $entityManager,
|
EntityManager $entityManager,
|
||||||
|
@ -78,9 +72,7 @@ class SettingAdminController extends AdminController
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
#[Route(path: '/delete/{entity}', name: 'admin_setting_delete', methods: ['DELETE', 'POST'])]
|
||||||
* @Route("/delete/{entity}", name="admin_setting_delete", methods={"DELETE"})
|
|
||||||
*/
|
|
||||||
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
|
||||||
{
|
{
|
||||||
if ($this->isCsrfTokenValid('delete'.$entity->getId(), $request->request->get('_token'))) {
|
if ($this->isCsrfTokenValid('delete'.$entity->getId(), $request->request->get('_token'))) {
|
||||||
|
|
Loading…
Reference in a new issue