custom/plugins/MolliePayments/src/Controller/Storefront/AbstractStoreFrontController.php line 22

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Kiener\MolliePayments\Controller\Storefront;
  4. use Psr\Container\ContainerInterface;
  5. use Shopware\Storefront\Controller\StorefrontController;
  6. abstract class AbstractStoreFrontController extends StorefrontController
  7. {
  8.     /**
  9.      * Since Shopware 6.6.0.0 twig must be set with setTwig method, prior the method does not exists
  10.      * @param ContainerInterface $container
  11.      * @throws \Psr\Container\ContainerExceptionInterface
  12.      * @throws \Psr\Container\NotFoundExceptionInterface
  13.      * @return null|ContainerInterface
  14.      */
  15.     public function setContainer(ContainerInterface $container): ?ContainerInterface
  16.     {
  17.         $container parent::setContainer($container);
  18.         if ($container instanceof ContainerInterface && method_exists($this'setTwig')) {
  19.             $this->setTwig($container->get('twig'));
  20.         }
  21.         return  $container;
  22.     }
  23. }