Browse code

Initial commit

Benjamin Roth authored on01/06/2023 13:12:27
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,34 @@
1
+<?php
2
+
3
+declare(strict_types=1);
4
+
5
+/*
6
+ * This file is part of dacore bundle for Contao.
7
+ *
8
+ * (c) Benjamin Roth
9
+ *
10
+ * @license commercial
11
+ */
12
+
13
+namespace vossmedien\DacoreBundle\DependencyInjection;
14
+
15
+use Symfony\Component\Config\FileLocator;
16
+use Symfony\Component\DependencyInjection\ContainerBuilder;
17
+use Symfony\Component\DependencyInjection\Extension\Extension;
18
+use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
19
+
20
+class VossmedienDacoreExtension extends Extension
21
+{
22
+    public function load(array $configs, ContainerBuilder $container): void
23
+    {
24
+        $config = $this->processConfiguration(new Configuration(), $configs);
25
+
26
+        foreach($config['softgarden'] as $key=>$val)
27
+        {
28
+            $container->setParameter('vossmedien_dacore.softgarden.'.$key,$val);
29
+        }
30
+
31
+        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
32
+        $loader->load('services.yml');
33
+    }
34
+}