mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 23:04:58 +00:00
Prepare for moving into monorepo
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive:
|
||||
table: chill_person_closingmotive
|
||||
type: entity
|
||||
repositoryClass: Chill\PersonBundle\Repository\ClosingMotiveRepository
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator: { strategy: AUTO }
|
||||
fields:
|
||||
name:
|
||||
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
|
@@ -0,0 +1,28 @@
|
||||
Chill\PersonBundle\Entity\AccompanyingPeriod:
|
||||
table: chill_person_accompanying_period
|
||||
type: entity
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator: { strategy: AUTO }
|
||||
fields:
|
||||
openingDate:
|
||||
type: date
|
||||
closingDate:
|
||||
type: date
|
||||
default: null
|
||||
nullable: true
|
||||
remark:
|
||||
type: text
|
||||
manyToOne:
|
||||
person:
|
||||
targetEntity: Person
|
||||
inversedBy: accompanyingPeriods
|
||||
cascade: [refresh]
|
||||
closingMotive:
|
||||
targetEntity: Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive
|
||||
nullable: true
|
||||
user:
|
||||
targetEntity: Chill\MainBundle\Entity\User
|
||||
nullable: true
|
@@ -0,0 +1,11 @@
|
||||
Chill\PersonBundle\Entity\MaritalStatus:
|
||||
table: chill_person_marital_status
|
||||
type: entity
|
||||
id:
|
||||
id:
|
||||
type: string
|
||||
length: 7
|
||||
fields:
|
||||
name:
|
||||
type: json_array
|
||||
lifecycleCallbacks: { }
|
@@ -0,0 +1,99 @@
|
||||
Chill\PersonBundle\Entity\Person:
|
||||
type: entity
|
||||
table: chill_person_person
|
||||
indexes:
|
||||
person_names:
|
||||
columns: [firstName, lastName]
|
||||
repositoryClass: Chill\PersonBundle\Repository\PersonRepository
|
||||
fields:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
firstName:
|
||||
type: string
|
||||
length: 255
|
||||
lastName:
|
||||
type: string
|
||||
length: 255
|
||||
birthdate:
|
||||
type: date
|
||||
nullable: true
|
||||
placeOfBirth:
|
||||
type: string
|
||||
length: 255
|
||||
column: place_of_birth
|
||||
default: ''
|
||||
gender:
|
||||
type: string
|
||||
length: 9
|
||||
nullable: true
|
||||
memo:
|
||||
type: text
|
||||
default: ''
|
||||
contactInfo:
|
||||
type: text
|
||||
nullable: true
|
||||
email:
|
||||
type: text
|
||||
nullable: true
|
||||
proxyAccompanyingPeriodOpenState:
|
||||
type: boolean
|
||||
name: proxy_open
|
||||
cFData:
|
||||
type: json_array
|
||||
phonenumber:
|
||||
type: text
|
||||
nullable: true
|
||||
length: 40
|
||||
mobilenumber:
|
||||
type: text
|
||||
nullable: true
|
||||
length: 40
|
||||
fullnameCanonical:
|
||||
type: text
|
||||
nullable: true
|
||||
manyToOne:
|
||||
countryOfBirth:
|
||||
targetEntity: Chill\MainBundle\Entity\Country
|
||||
inversedBy: birthsIn
|
||||
nullable: true
|
||||
nationality:
|
||||
targetEntity: Chill\MainBundle\Entity\Country
|
||||
inversedBy: nationals
|
||||
nullable: true
|
||||
center:
|
||||
targetEntity: Chill\MainBundle\Entity\Center
|
||||
nullable: false
|
||||
maritalStatus:
|
||||
targetEntity: Chill\PersonBundle\Entity\MaritalStatus
|
||||
nullable: true
|
||||
oneToMany:
|
||||
accompanyingPeriods:
|
||||
targetEntity: AccompanyingPeriod
|
||||
mappedBy: person
|
||||
cascade: [persist, remove, merge, detach]
|
||||
altNames:
|
||||
targetEntity: PersonAltName
|
||||
mappedBy: person
|
||||
cascade: [persist, remove, merge, detach]
|
||||
orphanRemoval: true
|
||||
manyToMany:
|
||||
spokenLanguages:
|
||||
targetEntity: Chill\MainBundle\Entity\Language
|
||||
joinTable:
|
||||
name: persons_spoken_languages
|
||||
joinColumns:
|
||||
person_id:
|
||||
referencedColumnName: id
|
||||
inverseJoinColumns:
|
||||
language_id:
|
||||
referencedColumnName: id
|
||||
addresses:
|
||||
targetEntity: Chill\MainBundle\Entity\Address
|
||||
orderBy: { 'validFrom': 'DESC' }
|
||||
joinTable:
|
||||
name: chill_person_persons_to_addresses
|
||||
cascade: [persist, remove, merge, detach]
|
||||
lifecycleCallbacks: { }
|
@@ -0,0 +1,21 @@
|
||||
Chill\PersonBundle\Entity\PersonAltName:
|
||||
type: entity
|
||||
table: chill_person_alt_name
|
||||
repositoryClass: Chill\PersonBundle\Repository\PersonAltNameRepository
|
||||
id:
|
||||
id:
|
||||
type: integer
|
||||
id: true
|
||||
generator:
|
||||
strategy: AUTO
|
||||
fields:
|
||||
key:
|
||||
type: string
|
||||
length: 255
|
||||
label:
|
||||
type: text
|
||||
|
||||
manyToOne:
|
||||
person:
|
||||
targetEntity: Person
|
||||
inversedBy: altNames
|
90
src/Bundle/ChillPerson/Resources/config/routing.yml
Normal file
90
src/Bundle/ChillPerson/Resources/config/routing.yml
Normal file
@@ -0,0 +1,90 @@
|
||||
chill_person_view:
|
||||
path: /{_locale}/person/{person_id}/general
|
||||
defaults: { _controller: ChillPersonBundle:Person:view }
|
||||
|
||||
chill_person_general_edit:
|
||||
path: /{_locale}/person/{person_id}/general/edit
|
||||
defaults: {_controller: ChillPersonBundle:Person:edit }
|
||||
|
||||
chill_person_general_update:
|
||||
path: /{_locale}/person/{person_id}/general/update
|
||||
defaults: {_controller: ChillPersonBundle:Person:update }
|
||||
|
||||
chill_person_new:
|
||||
path: /{_locale}/person/new
|
||||
defaults: {_controller: ChillPersonBundle:Person:new }
|
||||
|
||||
chill_person_review:
|
||||
path: /{_locale}/person/review
|
||||
defaults: {_controller: ChillPersonBundle:Person:review }
|
||||
|
||||
chill_person_create:
|
||||
path: /{_locale}/person/create
|
||||
defaults: {_controller: ChillPersonBundle:Person:create }
|
||||
|
||||
chill_person_search:
|
||||
path: /{_locale}/person/search
|
||||
defaults: { _controller: ChillPersonBundle:Person:search }
|
||||
options:
|
||||
menus:
|
||||
main:
|
||||
order: 30
|
||||
label: Search within persons
|
||||
|
||||
chill_person_accompanying_period_list:
|
||||
path: /{_locale}/person/{person_id}/accompanying-period
|
||||
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:list }
|
||||
|
||||
chill_person_accompanying_period_create:
|
||||
path: /{_locale}/person/{person_id}/accompanying-period/create
|
||||
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:create }
|
||||
|
||||
chill_person_accompanying_period_update:
|
||||
path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/update
|
||||
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:update }
|
||||
|
||||
chill_person_accompanying_period_close:
|
||||
path: /{_locale}/person/{person_id}/accompanying-period/close
|
||||
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:close }
|
||||
|
||||
chill_person_accompanying_period_open:
|
||||
path: /{_locale}/person/{person_id}/accompanying-period/open
|
||||
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:open }
|
||||
|
||||
chill_person_accompanying_period_re_open:
|
||||
path: /{_locale}/person/{person_id}/accompanying-period/{period_id}/re-open
|
||||
defaults: { _controller: ChillPersonBundle:AccompanyingPeriod:reOpen }
|
||||
|
||||
chill_person_address_list:
|
||||
path: /{_locale}/person/{person_id}/address/list
|
||||
defaults: { _controller: ChillPersonBundle:PersonAddress:list }
|
||||
|
||||
chill_person_address_create:
|
||||
path: /{_locale}/person/{person_id}/address/create
|
||||
defaults: { _controller: ChillPersonBundle:PersonAddress:create }
|
||||
methods: [POST]
|
||||
|
||||
chill_person_address_new:
|
||||
path: /{_locale}/person/{person_id}/address/new
|
||||
defaults: { _controller: ChillPersonBundle:PersonAddress:new }
|
||||
|
||||
chill_person_address_edit:
|
||||
path: /{_locale}/person/{person_id}/address/{address_id}/edit
|
||||
defaults: { _controller: ChillPersonBundle:PersonAddress:edit }
|
||||
|
||||
chill_person_address_update:
|
||||
path: /{_locale}/person/{person_id}/address/{address_id}/update
|
||||
defaults: { _controller: ChillPersonBundle:PersonAddress:update }
|
||||
|
||||
chill_person_timeline:
|
||||
path: /{_locale}/person/{person_id}/timeline
|
||||
defaults: { _controller: ChillPersonBundle:TimelinePerson:person }
|
||||
options:
|
||||
menus:
|
||||
person:
|
||||
order: 60
|
||||
label: Timeline
|
||||
|
||||
chill_person_admin:
|
||||
path: "/{_locale}/admin/person"
|
||||
defaults: { _controller: ChillPersonBundle:Admin:index }
|
41
src/Bundle/ChillPerson/Resources/config/services.yml
Normal file
41
src/Bundle/ChillPerson/Resources/config/services.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
parameters:
|
||||
# cl_chill_person.example.class: Chill\PersonBundle\Example
|
||||
|
||||
services:
|
||||
|
||||
|
||||
chill.person.form.type.select2maritalstatus:
|
||||
class: Chill\PersonBundle\Form\Type\Select2MaritalStatusType
|
||||
arguments:
|
||||
- "@request_stack"
|
||||
- "@doctrine.orm.entity_manager"
|
||||
tags:
|
||||
- { name: form.type, alias: select2_chill_marital_status }
|
||||
chill.person.timeline.accompanying_period_opening:
|
||||
class: Chill\PersonBundle\Timeline\TimelineAccompanyingPeriodOpening
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
tags:
|
||||
- { name: chill.timeline, context: 'person' }
|
||||
|
||||
chill.person.timeline.accompanying_period_closing:
|
||||
class: Chill\PersonBundle\Timeline\TimelineAccompanyingPeriodClosing
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
tags:
|
||||
- { name: chill.timeline, context: 'person' }
|
||||
|
||||
chill.person.security.authorization.person:
|
||||
class: Chill\PersonBundle\Security\Authorization\PersonVoter
|
||||
arguments:
|
||||
- "@chill.main.security.authorization.helper"
|
||||
tags:
|
||||
- { name: security.voter }
|
||||
- { name: chill.role }
|
||||
|
||||
chill.person.birthdate_validation:
|
||||
class: Chill\PersonBundle\Validator\Constraints\BirthdateValidator
|
||||
arguments:
|
||||
- "%chill_person.validation.birtdate_not_before%"
|
||||
tags:
|
||||
- { name: validator.constraint_validator, alias: birthdate_not_before }
|
@@ -0,0 +1,5 @@
|
||||
services:
|
||||
Chill\PersonBundle\Actions\Remove\PersonMove:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
@@ -0,0 +1,4 @@
|
||||
services:
|
||||
Chill\PersonBundle\Config\ConfigPersonAltNamesHelper:
|
||||
arguments:
|
||||
$config: '%chill_person.person_fields.alt_names%'
|
18
src/Bundle/ChillPerson/Resources/config/services/command.yml
Normal file
18
src/Bundle/ChillPerson/Resources/config/services/command.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
services:
|
||||
Chill\PersonBundle\Command\ImportPeopleFromCSVCommand:
|
||||
arguments:
|
||||
$logger: '@logger'
|
||||
$helper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$customFieldProvider: '@Chill\CustomFieldsBundle\Service\CustomFieldProvider'
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
tags:
|
||||
- { name: console.command }
|
||||
|
||||
Chill\PersonBundle\Command\ChillPersonMoveCommand:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$mover: '@Chill\PersonBundle\Actions\Remove\PersonMove'
|
||||
$chillLogger: '@chill.main.logger'
|
||||
tags:
|
||||
- { name: console.command }
|
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
Chill\PersonBundle\Controller\PersonController:
|
||||
arguments:
|
||||
$similarPersonMatcher: '@Chill\PersonBundle\Search\SimilarPersonMatcher'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
$personRepository: '@Chill\PersonBundle\Repository\PersonRepository'
|
||||
$configPersonAltNameHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags: ['controller.service_arguments']
|
||||
|
||||
Chill\PersonBundle\Controller\TimelinePersonController:
|
||||
arguments:
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
|
||||
Chill\PersonBundle\Controller\AccompanyingPeriodController:
|
||||
arguments:
|
||||
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
|
||||
|
||||
Chill\PersonBundle\Controller\AdminController: ~
|
68
src/Bundle/ChillPerson/Resources/config/services/exports.yml
Normal file
68
src/Bundle/ChillPerson/Resources/config/services/exports.yml
Normal file
@@ -0,0 +1,68 @@
|
||||
services:
|
||||
chill.person.export.export_count_person:
|
||||
class: Chill\PersonBundle\Export\Export\CountPerson
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
tags:
|
||||
- { name: chill.export, alias: count_person }
|
||||
|
||||
chill.person.export.list_person:
|
||||
class: Chill\PersonBundle\Export\Export\ListPerson
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "@translator"
|
||||
- "@chill.main.helper.translatable_string"
|
||||
- "@chill.custom_field.provider"
|
||||
tags:
|
||||
- { name: chill.export, alias: list_person }
|
||||
|
||||
chill.person.export.filter_gender:
|
||||
class: Chill\PersonBundle\Export\Filter\GenderFilter
|
||||
arguments:
|
||||
$translator: '@translator'
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: person_gender_filter }
|
||||
|
||||
chill.person.export.filter_birthdate:
|
||||
class: Chill\PersonBundle\Export\Filter\BirthdateFilter
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: person_birthdate_filter }
|
||||
|
||||
chill.person.export.filter_nationality:
|
||||
class: Chill\PersonBundle\Export\Filter\NationalityFilter
|
||||
arguments:
|
||||
- "@chill.main.helper.translatable_string"
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: person_nationality_filter }
|
||||
|
||||
chill.person.export.aggregator_nationality:
|
||||
class: Chill\PersonBundle\Export\Aggregator\NationalityAggregator
|
||||
arguments:
|
||||
- "@chill.main.countries_repository"
|
||||
- "@chill.main.helper.translatable_string"
|
||||
- "@translator"
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: person_nationality_aggregator }
|
||||
|
||||
chill.person.export.aggregator_country_of_birth:
|
||||
class: Chill\PersonBundle\Export\Aggregator\CountryOfBirthAggregator
|
||||
arguments:
|
||||
- "@chill.main.countries_repository"
|
||||
- "@chill.main.helper.translatable_string"
|
||||
- "@translator"
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: person_country_of_birth_aggregator }
|
||||
|
||||
chill.person.export.aggregator_gender:
|
||||
class: Chill\PersonBundle\Export\Aggregator\GenderAggregator
|
||||
arguments:
|
||||
- "@translator"
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: person_gender_aggregator }
|
||||
|
||||
chill.person.export.aggregator_age:
|
||||
class: Chill\PersonBundle\Export\Aggregator\AgeAggregator
|
||||
arguments:
|
||||
- "@translator"
|
||||
tags:
|
||||
- { name: chill.export_aggregator, alias: person_age_aggregator }
|
@@ -0,0 +1,15 @@
|
||||
services:
|
||||
chill.person.export.filter_accompanying_period:
|
||||
class: Chill\PersonBundle\Export\Filter\AccompanyingPeriodFilter
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: person_accc_period_filter }
|
||||
|
||||
chill.person.export.filter_accompanying_period_opening:
|
||||
class: Chill\PersonBundle\Export\Filter\AccompanyingPeriodOpeningFilter
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: person_acc_pe_op_filter }
|
||||
|
||||
chill.person.export.filter_accompanying_period_closing:
|
||||
class: Chill\PersonBundle\Export\Filter\AccompanyingPeriodClosingFilter
|
||||
tags:
|
||||
- { name: chill.export_filter, alias: person_acc_pe_cl_filter }
|
@@ -0,0 +1,4 @@
|
||||
services:
|
||||
Chill\PersonBundle\DataFixtures\ORM\:
|
||||
resource: ../../../DataFixtures/ORM
|
||||
tags: [ 'doctrine.fixture.orm' ]
|
56
src/Bundle/ChillPerson/Resources/config/services/form.yml
Normal file
56
src/Bundle/ChillPerson/Resources/config/services/form.yml
Normal file
@@ -0,0 +1,56 @@
|
||||
services:
|
||||
Chill\PersonBundle\Form\PersonType:
|
||||
arguments:
|
||||
- '%chill_person.person_fields%'
|
||||
- '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
chill.person.form.person_creation:
|
||||
alias: 'Chill\PersonBundle\Form\PersonType'
|
||||
deprecated: true
|
||||
|
||||
Chill\PersonBundle\Form\CreationPersonType:
|
||||
arguments:
|
||||
- '@chill.main.form.data_transformer.center_transformer'
|
||||
- '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags:
|
||||
- { name: form.type }
|
||||
|
||||
chill.main.form.person_creation:
|
||||
alias: 'Chill\PersonBundle\Form\CreationPersonType'
|
||||
deprecated: true
|
||||
|
||||
chill.person.accompanying_period_closing_motive:
|
||||
class: Chill\PersonBundle\Form\Type\ClosingMotivePickerType
|
||||
arguments:
|
||||
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
|
||||
$chillEntityRenderExtension: '@Chill\MainBundle\Templating\Entity\ChillEntityRenderExtension'
|
||||
$closingMotiveRepository: '@Chill\PersonBundle\Repository\ClosingMotiveRepository'
|
||||
|
||||
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 }
|
||||
|
||||
Chill\PersonBundle\Form\Type\PersonAltNameType:
|
||||
arguments:
|
||||
$configHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
$translatableStringHelper: '@chill.main.helper.translatable_string'
|
||||
tags:
|
||||
- { name: form.type }
|
19
src/Bundle/ChillPerson/Resources/config/services/menu.yml
Normal file
19
src/Bundle/ChillPerson/Resources/config/services/menu.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
services:
|
||||
Chill\PersonBundle\Menu\SectionMenuBuilder:
|
||||
arguments:
|
||||
$authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'
|
||||
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%'
|
||||
$translator: '@Symfony\Component\Translation\TranslatorInterface'
|
||||
tags:
|
||||
- { name: 'chill.menu_builder' }
|
@@ -0,0 +1,7 @@
|
||||
services:
|
||||
Chill\PersonBundle\Privacy\PrivacyEventSubscriber:
|
||||
arguments:
|
||||
$logger: '@chill.main.logger'
|
||||
$token: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||
tags:
|
||||
- { name: kernel.event_subscriber }
|
@@ -0,0 +1,21 @@
|
||||
services:
|
||||
chill.person.repository.person:
|
||||
class: Chill\PersonBundle\Person\PersonRepository
|
||||
deprecated: the service '%service_id%' is deprecated since 2019-10-30 and will be removed soon. Use 'Chill\PersonBundle\Repository\PersonRepository' instead
|
||||
factory: ['@doctrine.orm.entity_manager', getRepository]
|
||||
arguments:
|
||||
- 'Chill\PersonBundle\Entity\Person'
|
||||
|
||||
Chill\PersonBundle\Repository\PersonRepository:
|
||||
class: Chill\PersonBundle\Person\PersonRepository
|
||||
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 }
|
30
src/Bundle/ChillPerson/Resources/config/services/search.yml
Normal file
30
src/Bundle/ChillPerson/Resources/config/services/search.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
services:
|
||||
chill.person.search_person:
|
||||
class: Chill\PersonBundle\Search\PersonSearch
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "@security.token_storage"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@chill_main.paginator_factory"
|
||||
calls:
|
||||
- ['setContainer', ["@service_container"]]
|
||||
tags:
|
||||
- { name: chill.search, alias: 'person_regular' }
|
||||
|
||||
Chill\PersonBundle\Search\SimilarityPersonSearch:
|
||||
arguments:
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "@security.token_storage"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@chill_main.paginator_factory"
|
||||
- '@chill.person.search_person'
|
||||
calls:
|
||||
- ['setContainer', ["@service_container"]]
|
||||
tags:
|
||||
- { name: chill.search, alias: 'person_similarity' }
|
||||
|
||||
Chill\PersonBundle\Search\SimilarPersonMatcher:
|
||||
arguments:
|
||||
$em: '@Doctrine\ORM\EntityManagerInterface'
|
||||
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
|
||||
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
|
@@ -0,0 +1,11 @@
|
||||
services:
|
||||
Chill\PersonBundle\Search\PersonSearchByPhone:
|
||||
arguments:
|
||||
- '@Chill\PersonBundle\Repository\PersonRepository'
|
||||
- '@security.token_storage'
|
||||
- '@chill.main.security.authorization.helper'
|
||||
- '@chill_main.paginator_factory'
|
||||
- '@Symfony\Component\Templating\EngineInterface'
|
||||
- '%chill_person.search.search_by_phone%'
|
||||
tags:
|
||||
- { name: chill.search, alias: 'person_by_phone' }
|
@@ -0,0 +1,12 @@
|
||||
services:
|
||||
Chill\PersonBundle\Templating\Entity\PersonRender:
|
||||
arguments:
|
||||
$configAltNamesHelper: '@Chill\PersonBundle\Config\ConfigPersonAltNamesHelper'
|
||||
tags:
|
||||
- 'chill.render_entity'
|
||||
|
||||
Chill\PersonBundle\Templating\Entity\ClosingMotiveRender:
|
||||
arguments:
|
||||
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
|
||||
tags:
|
||||
- 'chill.render_entity'
|
14
src/Bundle/ChillPerson/Resources/config/services/widgets.yml
Normal file
14
src/Bundle/ChillPerson/Resources/config/services/widgets.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
services:
|
||||
chill_person.widget.person_list:
|
||||
class: Chill\PersonBundle\Widget\PersonListWidget
|
||||
arguments:
|
||||
- "@chill.person.repository.person"
|
||||
- "@doctrine.orm.entity_manager"
|
||||
- "@chill.main.security.authorization.helper"
|
||||
- "@security.token_storage"
|
||||
# this widget is defined by the PersonListWidgetFactory
|
||||
|
||||
chill_person.widget.add_person:
|
||||
class: Chill\PersonBundle\Widget\AddAPersonWidget
|
||||
tags:
|
||||
- { name: chill_widget, alias: add_person, place: homepage }
|
79
src/Bundle/ChillPerson/Resources/config/validation.yml
Normal file
79
src/Bundle/ChillPerson/Resources/config/validation.yml
Normal file
@@ -0,0 +1,79 @@
|
||||
Chill\PersonBundle\Entity\Person:
|
||||
properties:
|
||||
firstName:
|
||||
- NotBlank:
|
||||
groups: [general, creation]
|
||||
- Length:
|
||||
min: 2
|
||||
max: 255
|
||||
minMessage: 'This name is too short. It must containt {{ limit }} chars'
|
||||
maxMessage: 'This name is too long. It must containt {{ limit }} chars'
|
||||
groups: [general, creation]
|
||||
lastName:
|
||||
- NotBlank:
|
||||
groups: [general, creation]
|
||||
- Length:
|
||||
min: 2
|
||||
max: 255
|
||||
minMessage: 'This name is too short. It must containt {{ limit }} chars'
|
||||
maxMessage: 'This name is too long. It must containt {{ limit }} chars'
|
||||
groups: [general, creation]
|
||||
birthdate:
|
||||
- Date:
|
||||
message: 'Birthdate not valid'
|
||||
groups: [general, creation]
|
||||
- Chill\PersonBundle\Validator\Constraints\Birthdate:
|
||||
groups: [general, creation]
|
||||
gender:
|
||||
- NotNull:
|
||||
groups: [general, creation]
|
||||
accompanyingPeriods:
|
||||
- Valid:
|
||||
traverse: true
|
||||
email:
|
||||
- Email:
|
||||
groups: [general, creation]
|
||||
message: 'The email is not valid'
|
||||
checkMX: true
|
||||
phonenumber:
|
||||
- Regex:
|
||||
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
||||
groups: [general, creation]
|
||||
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33123456789'
|
||||
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
|
||||
type: landline
|
||||
groups: [ general, creation ]
|
||||
mobilenumber:
|
||||
- Regex:
|
||||
pattern: '/^([\+{1}])([0-9\s*]{4,20})$/'
|
||||
groups: [general, creation]
|
||||
message: 'Invalid phone number: it should begin with the international prefix starting with "+", hold only digits and be smaller than 20 characters. Ex: +33623456789'
|
||||
- Chill\MainBundle\Validation\Constraint\PhonenumberConstraint:
|
||||
type: mobile
|
||||
groups: [ general, creation ]
|
||||
|
||||
|
||||
constraints:
|
||||
- Callback:
|
||||
callback: isAccompanyingPeriodValid
|
||||
groups: [accompanying_period_consistent]
|
||||
- Callback:
|
||||
callback: isAddressesValid
|
||||
groups: [addresses_consistent]
|
||||
|
||||
Chill\PersonBundle\Entity\AccompanyingPeriod:
|
||||
properties:
|
||||
openingDate:
|
||||
- Date:
|
||||
message: 'Opening date is not valid'
|
||||
- NotNull:
|
||||
message: 'Opening date can not be null'
|
||||
closingDate:
|
||||
- Date:
|
||||
message: 'Closing date is not valid'
|
||||
- NotNull:
|
||||
message: 'Closing date can not be null'
|
||||
groups: [closed]
|
||||
constraints:
|
||||
- Callback:
|
||||
callback: isDateConsistent
|
Reference in New Issue
Block a user