-
-
Notifications
You must be signed in to change notification settings - Fork 261
/
Configuration.php
38 lines (34 loc) · 1.48 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
<?php
namespace SimpleThings\EntityAudit\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
public function getConfigTreeBuilder()
{
$builder = new TreeBuilder();
$builder->root('simple_things_entity_audit')
->children()
->arrayNode('audited_entities')
->prototype('scalar')->end()
->end()
->arrayNode('global_ignore_properties')
->prototype('scalar')->end()
->end()
->scalarNode('table_prefix')->defaultValue('')->end()
->scalarNode('table_suffix')->defaultValue('_audit')->end()
->scalarNode('revision_field_name')->defaultValue('rev')->end()
->scalarNode('revision_type_field_name')->defaultValue('revtype')->end()
->scalarNode('revision_table_name')->defaultValue('revisions')->end()
->scalarNode('revision_id_field_type')->defaultValue('integer')->end()
->arrayNode('service')
->addDefaultsIfNotSet()
->children()
->scalarNode('username_callable')->defaultValue('simplethings_entityaudit.username_callable.token_storage')->end()
->end()
->end()
->end()
;
return $builder;
}
}