[closing motive] add an hierarchy + admin section for closing motives

This commit is contained in:
2020-03-12 12:19:15 +01:00
parent ceb3b5e955
commit e59f58f461
26 changed files with 712 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive:
table: chill_person_closingmotive
type: entity
repositoryClass: Chill\PersonBundle\Repository\ClosingMotiveRepository
id:
id:
type: integer
@@ -11,3 +12,15 @@ Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive:
type: json_array
active:
type: boolean
ordering:
type: float
options:
default: 0.0
oneToMany:
children:
targetEntity: Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
mappedBy: parent
manyToOne:
parent:
targetEntity: Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
inversedBy: children

View File

@@ -83,4 +83,8 @@ chill_person_timeline:
menus:
person:
order: 60
label: Timeline
label: Timeline
chill_person_admin:
path: "/{_locale}/admin/person"
defaults: { _controller: ChillPersonBundle:Admin:index }

View File

@@ -15,3 +15,5 @@ services:
Chill\PersonBundle\Controller\AccompanyingPeriodController:
arguments:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
Chill\PersonBundle\Controller\AdminController: ~

View File

@@ -22,9 +22,12 @@ services:
deprecated: true
chill.person.accompanying_period_closing_motive:
class: Chill\PersonBundle\Form\Type\ClosingMotiveType
class: Chill\PersonBundle\Form\Type\ClosingMotivePickerType
arguments:
- "@chill.main.helper.translatable_string"
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
$chillEntityRenderExtension: '@Chill\MainBundle\Templating\Entity\ChillEntityRenderExtension'
$closingMotiveRepository: '@Chill\PersonBundle\Repository\ClosingMotiveRepository'
tags:
- { name: form.type, alias: closing_motive }

View File

@@ -5,6 +5,12 @@ services:
tags:
- { name: 'chill.menu_builder' }
Chill\PersonBundle\Menu\AdminMenuBuilder:
arguments:
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
tags:
- { name: 'chill.menu_builder' }
Chill\PersonBundle\Menu\PersonMenuBuilder:
arguments:
$showAccompanyingPeriod: '%chill_person.accompanying_period%'

View File

@@ -11,3 +11,11 @@ services:
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\PersonBundle\Entity\Person'
Chill\PersonBundle\Repository\ClosingMotiveRepository:
class: Chill\PersonBundle\Repository\ClosingMotiveRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive'
tag:
- { name: doctrine.repository_service }

View File

@@ -4,3 +4,9 @@ services:
$configAltNamesHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
tags:
- 'chill.render_entity'
Chill\PersonBundle\Templating\Entity\ClosingMotiveRender:
arguments:
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
tags:
- 'chill.render_entity'