Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

LcSovExtension.php 1.3KB

3 anos atrás
12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Lc\SovBundle\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 LcSovExtension 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_sov.%s', $parameter), $value);
  16. $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
  17. $loader->load('services.yml');
  18. }
  19. public function prepend(ContainerBuilder $container)
  20. {
  21. /*$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/easy_admin'));
  22. $loader->load('base.yaml');
  23. $loader->load('entities/merchant.yaml');*/
  24. }
  25. }