vendor/sylius/resource-bundle/src/Bundle/DependencyInjection/PagerfantaExtension.php line 48

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Sylius package.
  4.  *
  5.  * (c) Paweł Jędrzejewski
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. declare(strict_types=1);
  11. namespace Sylius\Bundle\ResourceBundle\DependencyInjection;
  12. use Symfony\Component\DependencyInjection\ContainerBuilder;
  13. use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
  14. use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  15. @trigger_error(sprintf('The "%s" class is deprecated since sylius/resource-bundle 1.7. Migrate your Pagerfanta configuration from WhiteOctoberPagerfantaBundle to BabDevPagerfantaBundle, the configuration bridge will be removed in Sylius 2.0.'PagerfantaExtension::class), \E_USER_DEPRECATED);
  16. /**
  17.  * Container extension to bridge the configuration from WhiteOctoberPagerfantaBundle to BabDevPagerfantaBundle
  18.  *
  19.  * @internal
  20.  */
  21. final class PagerfantaExtension extends Extension implements PrependExtensionInterface
  22. {
  23.     public function getAlias(): string
  24.     {
  25.         return 'white_october_pagerfanta';
  26.     }
  27.     public function getConfiguration(array $configContainerBuilder $container): PagerfantaConfiguration
  28.     {
  29.         return new PagerfantaConfiguration();
  30.     }
  31.     public function load(array $configsContainerBuilder $container): void
  32.     {
  33.         $config $this->processConfiguration($this->getConfiguration($configs$container), $configs);
  34.         $container->setParameter('white_october_pagerfanta.default_view'$config['default_view']);
  35.     }
  36.     public function prepend(ContainerBuilder $container): void
  37.     {
  38.         $config $this->processConfiguration($this->getConfiguration([], $container), $container->getExtensionConfig($this->getAlias()));
  39.         $container->prependExtensionConfig('babdev_pagerfanta'$config);
  40.     }
  41. }