allow to configure default values for users (#919)

This commit is contained in:
Kevin Papst
2019-07-05 02:42:50 +02:00
committed by GitHub
parent 3457f93ed0
commit 19843760e5
12 changed files with 142 additions and 29 deletions

View File

@@ -9,6 +9,7 @@
namespace App\DependencyInjection;
use App\Entity\User;
use App\Timesheet\Rounding\RoundingInterface;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@@ -435,11 +436,20 @@ class Configuration implements ConfigurationInterface
->arrayNode('customer')
->addDefaultsIfNotSet()
->children()
->scalarNode('timezone')->defaultValue('Europe/Berlin')->end()
->scalarNode('timezone')->defaultNull()->end()
->scalarNode('country')->defaultValue('DE')->end()
->scalarNode('currency')->defaultValue('EUR')->end()
->end()
->end()
->arrayNode('user')
->addDefaultsIfNotSet()
->children()
->scalarNode('timezone')->defaultNull()->end()
->scalarNode('language')->defaultValue(User::DEFAULT_LANGUAGE)->end()
->scalarNode('theme')->defaultNull()->end()
->end()
->end()
->end()
;