You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Lc\PietroBundle\DependencyInjection;
  3. use Symfony\Component\Config\FileLocator;
  4. use Symfony\Component\DependencyInjection\ContainerBuilder;
  5. use Symfony\Component\DependencyInjection\Extension\Extension;
  6. use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
  7. use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
  8. class LcPietroExtension extends Extension implements PrependExtensionInterface
  9. {
  10. public function load(array $configs, ContainerBuilder $container)
  11. {
  12. $configuration = new Configuration();
  13. $config = $this->processConfiguration($configuration, $configs);
  14. foreach ($config as $parameter => $value) {
  15. $container->setParameter(sprintf('lc_pietro.%s', $parameter), $value);
  16. }
  17. $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
  18. $loader->load('services.yaml');
  19. }
  20. public function prepend(ContainerBuilder $container)
  21. {
  22. /*$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/easy_admin'));
  23. $loader->load('base.yaml');
  24. $loader->load('entities/merchant.yaml');*/
  25. }
  26. }