added default settings for new customer form (#358)

This commit is contained in:
Toby Batch
2018-10-21 14:27:43 +01:00
committed by Kevin Papst
parent b46e752d0a
commit 3075276a52
7 changed files with 80 additions and 1 deletions

View File

@@ -39,6 +39,7 @@ class Configuration implements ConfigurationInterface
->append($this->getThemeNode())
->append($this->getDashboardNode())
->append($this->getWidgetsNode())
->append($this->getDefaultsNode())
->end()
->end();
@@ -303,4 +304,26 @@ class Configuration implements ConfigurationInterface
return $node;
}
protected function getDefaultsNode()
{
$builder = new TreeBuilder();
$node = $builder->root('defaults');
$node
->addDefaultsIfNotSet()
->children()
->arrayNode('customer')
->addDefaultsIfNotSet()
->children()
->scalarNode('timezone')->defaultValue('Europe/Berlin')->end()
->scalarNode('country')->defaultValue('DE')->end()
->scalarNode('currency')->defaultValue('EUR')->end()
->end()
->end()
->end()
;
return $node;
}
}