| Conditions | 1 |
| Paths | 1 |
| Total Lines | 41 |
| Code Lines | 36 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 14 | public function getConfigTreeBuilder() |
||
| 15 | { |
||
| 16 | $treeBuilder = new TreeBuilder('gbere_simple_auth'); |
||
| 17 | $rootNode = $treeBuilder->getRootNode(); |
||
| 18 | $rootNode |
||
| 19 | ->children() |
||
| 20 | ->arrayNode('sender') |
||
| 21 | ->addDefaultsIfNotSet() |
||
| 22 | ->children() |
||
| 23 | // TODO: check if it is a valid email |
||
| 24 | ->scalarNode('email')->defaultValue('[email protected]')->end() |
||
| 25 | ->scalarNode('name')->defaultValue('Sender Name')->end() |
||
| 26 | ->end() |
||
| 27 | ->end() |
||
| 28 | ->arrayNode('user') |
||
| 29 | ->addDefaultsIfNotSet() |
||
| 30 | ->children() |
||
| 31 | ->scalarNode('entity')->defaultValue(User::class)->info('If you want to extend the entity, the entity name must also be "User". Example: App/Entity/User')->end() |
||
| 32 | ->scalarNode('encoder_algorithm')->defaultValue('auto')->end() |
||
| 33 | ->end() |
||
| 34 | ->end() |
||
| 35 | ->arrayNode('admin_user') |
||
| 36 | ->addDefaultsIfNotSet() |
||
| 37 | ->children() |
||
| 38 | ->scalarNode('entity')->defaultValue(AdminUser::class)->info('If you want to extend the entity, the entity name must also be "AdminUser". Example: App/Entity/AdminUser')->end() |
||
| 39 | ->scalarNode('encoder_algorithm')->defaultValue('auto')->end() |
||
| 40 | ->end() |
||
| 41 | ->end() |
||
| 42 | ->arrayNode('style') |
||
| 43 | ->addDefaultsIfNotSet() |
||
| 44 | ->children() |
||
| 45 | ->scalarnode('logo')->defaultValue('demo')->info('Define a custom path, disable it with ~ char or set demo image')->end() |
||
| 46 | ->scalarnode('accent_color')->defaultValue('0088aa')->info('Set color in RGB hexadecimal without the #')->end() |
||
| 47 | ->end() |
||
| 48 | ->end() |
||
| 49 | ->integerNode('remember_me_lifetime')->defaultValue(null)->end() |
||
| 50 | ->booleanNode('confirm_registration')->defaultValue(true)->end() |
||
| 51 | ->end() |
||
| 52 | ; |
||
| 53 | |||
| 54 | return $treeBuilder; |
||
| 55 | } |
||
| 57 |