vendor/shopware/core/System/SalesChannel/SalesChannel/ContextRoute.php line 27

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\System\SalesChannel\SalesChannel;
  3. use Shopware\Core\Framework\Log\Package;
  4. use Shopware\Core\Framework\Plugin\Exception\DecorationPatternException;
  5. use Shopware\Core\Framework\Routing\Annotation\RouteScope;
  6. use Shopware\Core\Framework\Routing\Annotation\Since;
  7. use Shopware\Core\System\SalesChannel\SalesChannelContext;
  8. use Symfony\Component\Routing\Annotation\Route;
  9. /**
  10.  * @Route(defaults={"_routeScope"={"store-api"}})
  11.  */
  12. #[Package('core')]
  13. class ContextRoute extends AbstractContextRoute
  14. {
  15.     public function getDecorated(): AbstractContextRoute
  16.     {
  17.         throw new DecorationPatternException(self::class);
  18.     }
  19.     /**
  20.      * @Since("6.3.0.0")
  21.      * @Route("/store-api/context", name="store-api.context", methods={"GET"})
  22.      */
  23.     public function load(SalesChannelContext $context): ContextLoadRouteResponse
  24.     {
  25.         return new ContextLoadRouteResponse($context);
  26.     }
  27. }