sf4, fix errors with report bundle, adapt new config yaml directory

This commit is contained in:
2020-08-03 21:15:03 +02:00
parent d983247514
commit 00c3d1cb97
10 changed files with 11 additions and 13 deletions

51
config/routes.yaml Normal file
View File

@@ -0,0 +1,51 @@
report_select_type:
path: /{_locale}/person/{person_id}/report/select/type/for/creation
defaults: { _controller: "ChillReportBundle:Report:selectReportType" }
options:
menus:
person:
order: 100
label: Add a report
report_new:
path: /{_locale}/person/{person_id}/report/cfgroup/{cf_group_id}/new
defaults: { _controller: "ChillReportBundle:Report:new" }
report_create:
path: /{_locale}/person/{person_id}/report/cfgroup/{cf_group_id}/create
defaults: { _controller: "ChillReportBundle:Report:create" }
methods: [POST]
report_list:
path: /{_locale}/person/{person_id}/report/list
defaults: { _controller: "ChillReportBundle:Report:list" }
options:
menus:
person:
order: 101
label: Report list
report_view:
path: /{_locale}/person/{person_id}/report/{report_id}/view
defaults: { _controller: "ChillReportBundle:Report:view" }
report_edit:
path: /{_locale}/person/{person_id}/report/{report_id}/edit
defaults: { _controller: "ChillReportBundle:Report:edit" }
report_update:
path: /{_locale}/person/{person_id}/report/{report_id}/update
defaults: { _controller: "ChillReportBundle:Report:update" }
methods: [POST, PUT]
report_export_list:
path: /{_locale}/export/report/cfgroup/{cf_group_id}
defaults: { _controller: "ChillReportBundle:Report:export" }
report_export_select_type:
path: /{_locale}/export/report/select/type
defaults: {_controller: "ChillReportBundle:Report:selectReportTypeForExport" }
options:
menus:
export:
order: 100
label: Export reports

46
config/services.yaml Normal file
View File

@@ -0,0 +1,46 @@
services:
# chill_report.example:
# class: Chill\ReportBundle\Example
# arguments: [@service_id, "plain_value", %parameter%]
services:
chill.report.search:
class: Chill\ReportBundle\Search\ReportSearch
arguments:
- '@doctrine.orm.entity_manager'
- '@chill.main.security.authorization.helper'
- '@security.token_storage'
calls:
- [setContainer, ["@service_container"]]
tags:
- { name: chill.search, alias: 'report' }
chill.report.timeline:
class: Chill\ReportBundle\Timeline\TimelineReportProvider
arguments:
- '@doctrine.orm.entity_manager'
- '@chill.main.security.authorization.helper'
- '@security.token_storage'
- '@chill.custom_field.helper'
- '%chill_custom_fields.show_empty_values%'
tags:
- { name: chill.timeline, context: 'person' }
chill.report.security.authorization.report_voter:
class: Chill\ReportBundle\Security\Authorization\ReportVoter
arguments:
- "@chill.main.security.authorization.helper"
tags:
- { name: security.voter }
- { name: chill.role }
chill.report.form.report_type:
class: Chill\ReportBundle\Form\ReportType
arguments:
- "@chill.main.security.authorization.helper"
- "@security.token_storage"
- "@chill.main.helper.translatable_string"
- "@doctrine.orm.entity_manager"
tags:
- { name: form.type, alias: chill_reportbundle_report }

View File

@@ -0,0 +1,6 @@
services:
Chill\ReportBundle\Controller\ReportController:
arguments:
$eventDispatcher: '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
tags: ['controller.service_arguments']

View File

@@ -0,0 +1,13 @@
services:
Chill\ReportBundle\Export\Export\ReportListProvider:
arguments:
$em: '@Doctrine\ORM\EntityManagerInterface'
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
$customFieldProvider: '@Chill\CustomFieldsBundle\Service\CustomFieldProvider'
tags:
- { name: chill.export_elements_provider, prefix: 'report' }
Chill\ReportBundle\Export\Filter\ReportDateFilter:
tags:
- { name: chill.export_filter, alias: 'report_date' }

View File

@@ -0,0 +1,4 @@
services:
Chill\ReportBundle\DataFixtures\ORM\:
resource: ../../DataFixtures/ORM
tags: [ 'doctrine.fixture.orm' ]

5
config/validation.yaml Normal file
View File

@@ -0,0 +1,5 @@
Chill\ReportBundle\Entity\Report:
properties:
date:
- NotNull: ~
- Date: ~