src/DataGridBundle/DependencyInjection/SolidInvoiceDataGridExtension.php line 44

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of SolidInvoice project.
  5.  *
  6.  * (c) Pierre du Plessis <open-source@solidworx.co>
  7.  *
  8.  * This source file is subject to the MIT license that is bundled
  9.  * with this source code in the file LICENSE.
  10.  */
  11. namespace SolidInvoice\DataGridBundle\DependencyInjection;
  12. use Symfony\Component\Config\FileLocator;
  13. use Symfony\Component\DependencyInjection\ContainerBuilder;
  14. use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
  15. use Symfony\Component\HttpKernel\DependencyInjection\Extension;
  16. /**
  17.  * This is the class that loads and manages your bundle configuration.
  18.  *
  19.  * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
  20.  */
  21. class SolidInvoiceDataGridExtension extends Extension
  22. {
  23.     /**
  24.      * @param list<mixed> $configs
  25.      */
  26.     public function load(array $configsContainerBuilder $container): void
  27.     {
  28.         $loader = new PhpFileLoader($container, new FileLocator(__DIR__ '/../Resources/config'));
  29.         $loader->import('services/*.php');
  30.         $grids $this->processConfiguration($this->getConfiguration($configs$container), $configs);
  31.         $container->setParameter('grid.definitions'$grids);
  32.     }
  33.     /**
  34.      * @param list<mixed> $config
  35.      */
  36.     public function getConfiguration(array $configContainerBuilder $container): GridConfiguration
  37.     {
  38.         return new GridConfiguration();
  39.     }
  40.     public function getAlias(): string
  41.     {
  42.         return 'datagrid';
  43.     }
  44. }