-
Notifications
You must be signed in to change notification settings - Fork 1
/
MapbenderDataManagerBundle.php
36 lines (32 loc) · 1.2 KB
/
MapbenderDataManagerBundle.php
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
<?php
namespace Mapbender\DataManagerBundle;
use Mapbender\DataSourceBundle\MapbenderDataSourceBundle;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\HttpKernel\Bundle\Bundle;
/**
* Data manager bundle.
*
* @author Andriy Oblivantsev
*/
class MapbenderDataManagerBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
// Ensure DataSourceBundle services exist (independent of kernel registration)
$dsBundle = new MapbenderDataSourceBundle();
$dsBundle->build($container);
$configLocator = new FileLocator(__DIR__ . '/Resources/config');
$loader = new XmlFileLoader($container, $configLocator);
$loader->load('services.xml');
$container->addResource(new FileResource($loader->getLocator()->locate('services.xml')));
$loader->load('elements.xml');
$container->addResource(new FileResource($loader->getLocator()->locate('elements.xml')));
}
public function getContainerExtension()
{
return null;
}
}