vendor/pimcore/enterprise-subscription-tools/src/Controller/LicenseCheckController.php line 27

Open in your IDE?
  1. <?php
  2. /**
  3.  * Pimcore
  4.  *
  5.  * This source file is available under following license:
  6.  * - Pimcore Commercial License (PCL)
  7.  *
  8.  *  @copyright  Copyright (c) Pimcore GmbH (http://www.pimcore.org)
  9.  *  @license    http://www.pimcore.org/license     PCL
  10.  */
  11. namespace Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Controller;
  12. use Pimcore\Bundle\AdminBundle\HttpFoundation\JsonResponse;
  13. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Service\EnterpriseSubscriptionStatusService;
  14. use Pimcore\Bundle\EnterpriseSubscriptionToolsBundle\Service\EnvironmentGuesser;
  15. use Pimcore\Controller\FrontendController;
  16. use Symfony\Component\HttpFoundation\Request;
  17. use Symfony\Component\Routing\Annotation\Route;
  18. class LicenseCheckController extends FrontendController
  19. {
  20.     /**
  21.      * @Route("/admin/enterprise-subscription-tools/instance-info")
  22.      */
  23.     public function instanceInfoAction(Request $requestEnterpriseSubscriptionStatusService $serviceEnvironmentGuesser $environmentGuesser)
  24.     {
  25.         $environment $environmentGuesser->getEnvironment();
  26.         return new JsonResponse([
  27.             'success' => true,
  28.             'instanceId' => $service->getInstanceId(),
  29.             'environment' => $environment,
  30.             'instanceCode' => $service->buildInstanceCode()
  31.         ]);
  32.     }
  33. }