remove accompanying period if not used

This commit is contained in:
2018-08-21 16:27:33 +02:00
parent c21b87b9c6
commit b4801734d3
8 changed files with 181 additions and 14 deletions

View File

@@ -74,6 +74,7 @@ class Configuration implements ConfigurationInterface
->append($this->addFieldNode('marital_status'))
->append($this->addFieldNode('spoken_languages'))
->append($this->addFieldNode('address'))
->append($this->addFieldNode('accompanying_period'))
->end() //children for 'person_fields', parent = array 'person_fields'
->end() // person_fields, parent = children of root
->end() // children of 'root', parent = root
@@ -87,11 +88,20 @@ class Configuration implements ConfigurationInterface
{
$tree = new TreeBuilder();
$node = $tree->root($key, 'enum');
switch($key) {
case 'accompanying_period':
$info = "If the accompanying periods are shown";
break;
default:
$info = "If the field $key must be shown";
break;
}
$node
->values(array('hidden', 'visible'))
->defaultValue('visible')
->info("If the field $key must be shown")
->info($info)
->end();
return $node;