Add a link between accompanying period and user

It is now allowed to indicates who make/made the accompanying period.

This feature may be hidden by a specific configuration option. Default
to visible.
This commit is contained in:
2019-07-01 15:21:34 +02:00
parent 5b60415166
commit 19cc54a674
13 changed files with 173 additions and 31 deletions

View File

@@ -23,3 +23,6 @@ Chill\PersonBundle\Entity\AccompanyingPeriod:
closingMotive:
targetEntity: Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
nullable: true
user:
targetEntity: Chill\MainBundle\Entity\User
nullable: true

View File

@@ -2,19 +2,7 @@ parameters:
# cl_chill_person.example.class: Chill\PersonBundle\Example
services:
chill.person.form.person_creation:
class: Chill\PersonBundle\Form\PersonType
arguments:
- %chill_person.person_fields%
tags:
- { name: form.type }
chill.person.accompanying_period_closing_motive:
class: Chill\PersonBundle\Form\Type\ClosingMotiveType
arguments:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type, alias: closing_motive }
chill.person.form.type.select2maritalstatus:
class: Chill\PersonBundle\Form\Type\Select2MaritalStatusType
@@ -59,16 +47,6 @@ services:
tags:
- { name: form.type, alias: chill_personbundle_person_creation }
chill.person.form.type.pick_person:
class: Chill\PersonBundle\Form\Type\PickPersonType
arguments:
- "@chill.person.repository.person"
- "@security.token_storage"
- "@chill.main.security.authorization.helper"
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
- '@Symfony\Component\Translation\TranslatorInterface'
tags:
- { name: form.type }
chill.person.repository.person:
class: Chill\PersonBundle\Entity\PersonRepository

View File

@@ -0,0 +1,31 @@
services:
chill.person.form.person_creation:
class: Chill\PersonBundle\Form\PersonType
arguments:
- "%chill_person.person_fields%"
tags:
- { name: form.type }
chill.person.accompanying_period_closing_motive:
class: Chill\PersonBundle\Form\Type\ClosingMotiveType
arguments:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type, alias: closing_motive }
Chill\PersonBundle\Form\AccompanyingPeriodType:
arguments:
$config: "%chill_person.accompanying_period_fields%"
tags:
- { name: form.type }
chill.person.form.type.pick_person:
class: Chill\PersonBundle\Form\Type\PickPersonType
arguments:
- "@chill.person.repository.person"
- "@security.token_storage"
- "@chill.main.security.authorization.helper"
- '@Symfony\Component\Routing\Generator\UrlGeneratorInterface'
- '@Symfony\Component\Translation\TranslatorInterface'
tags:
- { name: form.type }