]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/DependencyInjection/WallabagCoreExtension.php
Fix tags count in menu
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / DependencyInjection / WallabagCoreExtension.php
CommitLineData
9d50517c
NL
1<?php
2
ad4d1caa 3namespace Wallabag\CoreBundle\DependencyInjection;
9d50517c 4
9d50517c 5use Symfony\Component\Config\FileLocator;
619cc453 6use Symfony\Component\DependencyInjection\ContainerBuilder;
769e19dc 7use Symfony\Component\DependencyInjection\Loader;
619cc453 8use Symfony\Component\HttpKernel\DependencyInjection\Extension;
9d50517c 9
ad4d1caa 10class 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']);
bca54859 22 $container->setParameter('wallabag_core.reading_speed', $config['reading_speed']);
63e40f2d
JB
23 $container->setParameter('wallabag_core.version', $config['version']);
24 $container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
b3f4a11a 25 $container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']);
c89d35e8 26
769e19dc 27 $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
7ffb1e80 28 $loader->load('services.yml');
39f27d63 29 $loader->load('parameters.yml');
9d50517c
NL
30 }
31
32 public function getAlias()
33 {
ad4d1caa 34 return 'wallabag_core';
9d50517c
NL
35 }
36}