-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathWelpIcalExtension.php
More file actions
37 lines (30 loc) · 1.1 KB
/
WelpIcalExtension.php
File metadata and controls
37 lines (30 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Welp\IcalBundle\DependencyInjection;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
use Symfony\Component\DependencyInjection\Loader;
/**
* This is the class that loads and manages your bundle configuration.
*
* @link http://symfony.com/doc/current/cookbook/bundles/extension.html
*/
class WelpIcalExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container): void
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('welp_ical.default_timezone', $config['default_timezone']);
$container->setParameter('welp_ical.default_prodid', $config['default_prodid']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');
}
/**
* Get alias
*/
public function getAlias(): string
{
return 'welp_ical';
}
}