sf4, setting new path for all config yaml files, and replace 'controller' path syntax in routes definitions

This commit is contained in:
2020-08-03 18:05:32 +02:00
parent f2f22c359f
commit b7eeebfd43
14 changed files with 45 additions and 46 deletions

View File

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

View File

@@ -0,0 +1,82 @@
services:
chill.activity.export.count_activity:
class: Chill\ActivityBundle\Export\Export\CountActivity
arguments:
- "@doctrine.orm.entity_manager"
tags:
- { name: chill.export, alias: 'count_activity' }
chill.activity.export.sum_activity_duration:
class: Chill\ActivityBundle\Export\Export\StatActivityDuration
arguments:
- "@doctrine.orm.entity_manager"
- "sum"
tags:
- { name: chill.export, alias: 'sum_activity_duration' }
chill.activity.export.list_activity:
class: Chill\ActivityBundle\Export\Export\ListActivity
arguments:
- "@doctrine.orm.entity_manager"
- "@translator"
- "@chill.main.helper.translatable_string"
tags:
- { name: chill.export, alias: 'list_activity' }
chill.activity.export.reason_filter:
class: Chill\ActivityBundle\Export\Filter\ActivityReasonFilter
arguments:
- "@chill.main.helper.translatable_string"
- "@chill_activity.repository.reason"
tags:
- { name: chill.export_filter, alias: 'activity_reason_filter' }
chill.activity.export.type_filter:
class: Chill\ActivityBundle\Export\Filter\ActivityTypeFilter
arguments:
- "@chill.main.helper.translatable_string"
- "@chill_activity.repository.activity_type"
tags:
- { name: chill.export_filter, alias: 'activity_type_filter' }
chill.activity.export.date_filter:
class: Chill\ActivityBundle\Export\Filter\ActivityDateFilter
arguments:
- "@translator"
tags:
- { name: chill.export_filter, alias: 'activity_date_filter' }
chill.activity.export.person_having_an_activity_between_date_filter:
class: Chill\ActivityBundle\Export\Filter\PersonHavingActivityBetweenDateFilter
arguments:
- "@chill.main.helper.translatable_string"
- "@chill_activity.repository.reason"
- "@translator"
tags:
- #0 register as a filter
name: chill.export_filter
alias: 'activity_person_having_ac_bw_date_filter'
chill.activity.export.reason_aggregator:
class: Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator
arguments:
- "@chill_activity.repository.reason_category"
- "@chill_activity.repository.reason"
- "@chill.main.helper.translatable_string"
tags:
- { name: chill.export_aggregator, alias: activity_reason_aggregator }
chill.activity.export.type_aggregator:
class: Chill\ActivityBundle\Export\Aggregator\ActivityTypeAggregator
arguments:
- "@chill_activity.repository.activity_type"
- "@chill.main.helper.translatable_string"
tags:
- { name: chill.export_aggregator, alias: activity_type_aggregator }
chill.activity.export.user_aggregator:
class: Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator
arguments:
$em: "@doctrine.orm.entity_manager"
tags:
- { name: chill.export_aggregator, alias: activity_user_aggregator }

View File

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

35
config/services/form.yaml Normal file
View File

@@ -0,0 +1,35 @@
---
services:
chill.activity.form.type.translatableactivityreasoncategory:
class: Chill\ActivityBundle\Form\Type\TranslatableActivityReasonCategory
arguments:
- "@request_stack"
tags:
- { name: form.type, alias: translatable_activity_reason_category }
chill.activity.form.type.translatableactivityreason:
class: Chill\ActivityBundle\Form\Type\TranslatableActivityReason
arguments:
$translatableStringHelper: "@chill.main.helper.translatable_string"
$reasonRender: '@Chill\ActivityBundle\Templating\Entity\ActivityReasonRender'
tags:
- { name: form.type, alias: translatable_activity_reason }
chill.activity.form.type.translatableactivitytype:
class: Chill\ActivityBundle\Form\Type\TranslatableActivityType
arguments:
- "@chill.main.helper.translatable_string"
- "@chill_activity.repository.activity_type"
tags:
- { name: form.type, alias: translatable_activity_type }
chill.activity.form.type.activity:
class: Chill\ActivityBundle\Form\ActivityType
arguments:
- "@security.token_storage"
- "@chill.main.security.authorization.helper"
- "@doctrine.orm.entity_manager"
- "@chill.main.helper.translatable_string"
- "%chill_activity.form.time_duration%"
tags:
- { name: form.type, alias: chill_activitybundle_activity }

View File

@@ -0,0 +1,8 @@
services:
Chill\ActivityBundle\Menu\MenuBuilder:
arguments:
$authorizationHelper: '@Chill\MainBundle\Security\Authorization\AuthorizationHelper'
$tokenStorage: '@Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'
$translator: '@Symfony\Component\Translation\TranslatorInterface'
tags:
- { name: 'chill.menu_builder' }

View File

@@ -0,0 +1,18 @@
services:
chill_activity.repository.activity_type:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\ActivityBundle\Entity\ActivityType'
chill_activity.repository.reason:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\ActivityBundle\Entity\ActivityReason'
chill_activity.repository.reason_category:
class: Doctrine\ORM\EntityRepository
factory: ['@doctrine.orm.entity_manager', getRepository]
arguments:
- 'Chill\ActivityBundle\Entity\ActivityReasonCategory'

View File

@@ -0,0 +1,7 @@
---
services:
Chill\ActivityBundle\Templating\Entity\ActivityReasonRender:
arguments:
$translatableStringHelper: '@Chill\MainBundle\Templating\TranslatableStringHelper'
tags:
- { name: 'chill.render_entity' }