You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 satır
1022B

  1. <?php
  2. namespace Lc\ShopBundle\Controller;
  3. use App\Entity\Merchant;
  4. use Lc\ShopBundle\Context\MerchantInterface;
  5. class MerchantController extends AbstractController
  6. {
  7. protected $repo;
  8. public function __construct()
  9. {
  10. $this->repo = $this->em->getRepository(MerchantInterface::class);
  11. }
  12. public function edit(){
  13. $merchant = new Merchant();
  14. $merchant->setCreatedBy($this->user);
  15. $merchant->setUpdatedBy($this->user);
  16. $this->em->persist($merchant);
  17. $this->em->flush();
  18. die();
  19. $merchant = $this->repo->find($id);
  20. dump($merchant);
  21. return $this->render('@LcShop/merchant/edit.html.twig', [
  22. ]);
  23. }
  24. public function list(){
  25. return $this->render('merchant/index.html.twig', [
  26. 'controller_name' => 'MerchantController',
  27. ]);
  28. }
  29. }