vendor/store.shopware.com/swagplatformsecurity/src/Subscriber/TwigStateProvider.php line 20

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Swag\Security\Subscriber;
  3. use Shopware\Storefront\Event\StorefrontRenderEvent;
  4. use Swag\Security\Components\State;
  5. class TwigStateProvider
  6. {
  7.     /**
  8.      * @var State
  9.      */
  10.     private $state;
  11.     public function __construct(State $state)
  12.     {
  13.         $this->state $state;
  14.     }
  15.     public function __invoke(StorefrontRenderEvent $event): void
  16.     {
  17.         $event->setParameter('swagSecurity'$this->state);
  18.     }
  19. }