Преглед на файлове

Listes : redirection de l'action show vers le edit

reduction
Guillaume преди 4 години
родител
ревизия
1bcb39a1fd
променени са 1 файла, в които са добавени 13 реда и са изтрити 2 реда
  1. +13
    -2
      ShopBundle/Controller/Admin/AdminController.php

+ 13
- 2
ShopBundle/Controller/Admin/AdminController.php Целия файл

@@ -2,8 +2,10 @@

namespace Lc\ShopBundle\Controller\Admin;

use App\Entity\PointSale;
use App\Entity\ProductCategory;
use Doctrine\DBAL\Types\TextType;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController;
use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents;
@@ -33,14 +35,23 @@ class AdminController extends EasyAdminController
protected $security;
protected $userManager;


public function __construct(Security $security, UserManagerInterface $userManager)
{
$this->security = $security;
$this->userManager = $userManager;

}

public function showAction()
{
$id = $this->request->query->get('id');
$entity = $this->request->query->get('entity');

return $this->redirectToRoute('easyadmin', [
'action' => 'edit',
'entity' => $entity,
'id' => $id
]) ;
}

protected function createListQueryBuilder($entityClass, $sortDirection, $sortField = null, $dqlFilter = null)
{

Loading…
Отказ
Запис