|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Lc\ShopBundle\Controller\Admin; |
|
|
namespace Lc\ShopBundle\Controller\Admin; |
|
|
|
|
|
|
|
|
|
|
|
use App\Entity\PointSale; |
|
|
use App\Entity\ProductCategory; |
|
|
use App\Entity\ProductCategory; |
|
|
use Doctrine\DBAL\Types\TextType; |
|
|
use Doctrine\DBAL\Types\TextType; |
|
|
|
|
|
use Doctrine\ORM\EntityManagerInterface; |
|
|
use Doctrine\ORM\EntityRepository; |
|
|
use Doctrine\ORM\EntityRepository; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents; |
|
|
use EasyCorp\Bundle\EasyAdminBundle\Event\EasyAdminEvents; |
|
|
|
|
|
|
|
|
protected $security; |
|
|
protected $security; |
|
|
protected $userManager; |
|
|
protected $userManager; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct(Security $security, UserManagerInterface $userManager) |
|
|
public function __construct(Security $security, UserManagerInterface $userManager) |
|
|
{ |
|
|
{ |
|
|
$this->security = $security; |
|
|
$this->security = $security; |
|
|
$this->userManager = $userManager; |
|
|
$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) |
|
|
protected function createListQueryBuilder($entityClass, $sortDirection, $sortField = null, $dqlFilter = null) |
|
|
{ |
|
|
{ |