app/Customize/Controller/LineLinkageController.php line 76

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.
  6.  *
  7.  * http://www.ec-cube.co.jp/
  8.  *
  9.  * For the full copyright and license information, please view the LICENSE
  10.  * file that was distributed with this source code.
  11.  */
  12. namespace Customize\Controller;
  13. use Eccube\Entity\Product;
  14. use Customize\Form\Type\EstimationType;
  15. use Eccube\Repository\ProductRepository;
  16. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  17. use Symfony\Component\HttpFoundation\Request;
  18. use Symfony\Component\Routing\Annotation\Route;
  19. use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken;
  20. use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
  21. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  22. use Eccube\Repository\CategoryRepository;
  23. use Eccube\Repository\CustomerRepository;
  24. use Eccube\Repository\Master\PrefRepository;
  25. use Customize\Service\MailService;
  26. use Eccube\Event\EccubeEvents;
  27. use Eccube\Event\EventArgs;
  28. use Symfony\Component\Form\Form;
  29. use Customize\Service\FileUploader;
  30. use Plugin\ECCUBE4LineLoginIntegration42\Consts\ApiUrl;
  31. use Plugin\ECCUBE4LineLoginIntegration42\Entity\LineLoginIntegration;
  32. use Plugin\ECCUBE4LineLoginIntegration42\Controller\LineLoginIntegrationController;
  33. use Plugin\ECCUBE4LineLoginIntegration42\Controller\Admin\LineLoginIntegrationAdminController;
  34. use Plugin\ECCUBE4LineLoginIntegration42\Repository\LineLoginIntegrationSettingRepository;
  35. use Plugin\ECCUBE4LineLoginIntegration42\Repository\LineLoginIntegrationRepository;
  36. use Psr\Log\LoggerInterface;
  37. use Symfony\Contracts\HttpClient\HttpClientInterface;
  38. use Symfony\Component\HttpFoundation\JsonResponse;
  39. use Symfony\Component\Security\Core\Security;
  40. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  41. class LineLinkageController extends AbstractController
  42. {
  43.     private $lineIntegrationSettingRepository;
  44.     private $lineIntegrationRepository;
  45.     private $customerRepository;
  46.     private $tokenStorage;
  47.     protected $apiUrl;
  48.     private HttpClientInterface $httpClient;
  49.     public function __construct(
  50.         LineLoginIntegrationSettingRepository $lineIntegrationSettingRepository,
  51.         LineLoginIntegrationRepository $lineIntegrationRepository,
  52.         CustomerRepository $customerRepository,
  53.         TokenStorageInterface $tokenStorage,
  54.         ApiUrl $apiUrl,
  55.         HttpClientInterface $httpClient
  56.     ) {
  57.         $this->lineIntegrationSettingRepository $lineIntegrationSettingRepository;
  58.         $this->lineIntegrationRepository $lineIntegrationRepository;
  59.         $this->customerRepository $customerRepository;
  60.         $this->tokenStorage $tokenStorage;
  61.         $this->apiUrl $apiUrl;
  62.         $this->httpClient $httpClient;
  63.     }
  64.     /**
  65.      * ライン連携するページ.
  66.      *
  67.      * @Route("/line_linkage", name="line_linkage", methods={"GET"})
  68.      * @Template("@user_data/line_linkage.twig")
  69.      */
  70.     public function line_linkage(Request $request)
  71.     {
  72.         //getでtargが入っていたらsessionに投入
  73.         $session $request->getSession();
  74.         $session->set('targ_contact'base64_decode($request->query->get('targ')));
  75.         $already_flg '';
  76.         return ['already_flg' => $already_flg];
  77.     }
  78. }