-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathConfiguration.php
More file actions
42 lines (37 loc) · 1.34 KB
/
Configuration.php
File metadata and controls
42 lines (37 loc) · 1.34 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
38
39
40
41
42
<?php
namespace DonkeyCode\MailBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
/**
* Generates the configuration tree builder.
*
* @return TreeBuilder The tree builder
*/
public function getConfigTreeBuilder()
{
$treeBuilder = new TreeBuilder();
$rootNode = $treeBuilder->root('donkey_code_mail');
$rootNode
->children()
->scalarNode('mail_from')->defaultNull()->end()
->scalarNode('reply_to')->defaultNull()->end()
->arrayNode('options')
->info('Colors for default layout args')
->treatNullLike(array())
->useAttributeAsKey('key')
->prototype('scalar')->end()
->defaultValue(array(
'header_bg' => "#2d7cff",
'header_txt_color' => "#ffffff",
'bg' => "#efefef",
'txt_color' => "#555555",
"font_family" => "Helvetica Neue"
))
->end()
->end()
;
return $treeBuilder;
}
}