forked from dustin10/VichGeographicalBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Configuration.php
54 lines (50 loc) · 1.97 KB
/
Configuration.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
namespace Vich\GeographicalBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* Configuration.
*
* @author Dustin Dobervich <[email protected]>
*/
class Configuration implements ConfigurationInterface
{
/**
* Gets the configuration tree builder for the extension.
*
* @return Tree The configuration tree builder
*/
public function getConfigTreeBuilder()
{
$tb = new TreeBuilder();
$root = $tb->root('vich_geographical');
$root
->children()
->scalarNode('db_driver')->cannotBeOverwritten()->isRequired()->end()
->scalarNode('query_service')->cannotBeEmpty()->defaultValue('vich_geographical.query_service.default')->end()
->scalarNode('map_renderer')->cannotBeEmpty()->defaultValue('vich_geographical.map_renderer.google')->end()
->scalarNode('icon_generator')->cannotBeEmpty()->defaultValue('vich_geographical.icon_generator.default')->end()
->arrayNode('templating')
->addDefaultsIfNotSet()
->children()
->scalarNode('engine')->defaultValue('twig')->end()
->scalarNode('info_window')->defaultValue('VichGeographicalBundle:InfoWindow:default.html.twig')->end()
->end()
->end()
->arrayNode('leaflet')
->addDefaultsIfNotSet()
->children()
->scalarNode('api_key')->defaultNull()->end()
->end()
->end()
->arrayNode('bing')
->addDefaultsIfNotSet()
->children()
->scalarNode('api_key')->defaultNull()->end()
->end()
->end()
->end()
;
return $tb;
}
}