|
|
@@ -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) |
|
|
|
{ |