add model + form to handle alt names

This commit is contained in:
2020-01-30 15:51:39 +01:00
parent 7b7ce4a604
commit 426458811c
14 changed files with 482 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
$loader->load('services/form.yml');
$loader->load('services/repository.yml');
$loader->load('services/templating.yml');
$loader->load('services/alt_names.yml');
// load service advanced search only if configure
if ($config['search']['search_by_phone'] != 'never') {

View File

@@ -78,6 +78,26 @@ class Configuration implements ConfigurationInterface
->append($this->addFieldNode('address'))
->append($this->addFieldNode('accompanying_period'))
->append($this->addFieldNode('memo'))
->arrayNode('alt_names')
->defaultValue([])
->arrayPrototype()
->children()
->scalarNode('key')
->isRequired()->cannotBeEmpty()
->end()
->arrayNode('labels')->isRequired()->cannotBeEmpty()
->children()
->scalarNode('lang')->isRequired()->cannotBeEmpty()
->example('fr')
->end()
->scalarNode('label')->isRequired()->cannotBeEmpty()
->example('Nom de jeune fille')
->end()
->end()
->end()
->end()
->end()
->end()
->end() //children for 'person_fields', parent = array 'person_fields'
->end() // person_fields, parent = children of root
->arrayNode('accompanying_periods_fields')