]>
Commit | Line | Data |
---|---|---|
9d50517c NL |
1 | <?php |
2 | ||
ad4d1caa | 3 | namespace Wallabag\CoreBundle\DependencyInjection; |
9d50517c | 4 | |
9d50517c | 5 | use Symfony\Component\Config\FileLocator; |
619cc453 | 6 | use Symfony\Component\DependencyInjection\ContainerBuilder; |
769e19dc | 7 | use Symfony\Component\DependencyInjection\Loader; |
619cc453 | 8 | use Symfony\Component\HttpKernel\DependencyInjection\Extension; |
9d50517c | 9 | |
ad4d1caa | 10 | class WallabagCoreExtension extends Extension |
9d50517c NL |
11 | { |
12 | public function load(array $configs, ContainerBuilder $container) | |
13 | { | |
c89d35e8 NL |
14 | $configuration = new Configuration(); |
15 | $config = $this->processConfiguration($configuration, $configs); | |
bc789687 | 16 | |
c89d35e8 | 17 | $container->setParameter('wallabag_core.languages', $config['languages']); |
bc789687 JB |
18 | $container->setParameter('wallabag_core.items_on_page', $config['items_on_page']); |
19 | $container->setParameter('wallabag_core.theme', $config['theme']); | |
20 | $container->setParameter('wallabag_core.language', $config['language']); | |
21 | $container->setParameter('wallabag_core.rss_limit', $config['rss_limit']); | |
63e40f2d JB |
22 | $container->setParameter('wallabag_core.version', $config['version']); |
23 | $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']); | |
c89d35e8 | 24 | |
769e19dc | 25 | $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
7ffb1e80 | 26 | $loader->load('services.yml'); |
9d50517c NL |
27 | } |
28 | ||
29 | public function getAlias() | |
30 | { | |
ad4d1caa | 31 | return 'wallabag_core'; |
9d50517c NL |
32 | } |
33 | } |