Julien Fastré 77b7333fea Allow encoding of an activity with configuration preset durations
fix #11

The activity form allow to receive pre-configured activity durations.

Those duration can be configured through the option
chill_activity.form.time_duration :

```yaml

chill_activity:
   form:
      time_duration:
         - { label: '12 minutes', seconds: 720 }
         # - ...

```

If a pre-existing activity receives a different time, the time is added
to the list of pre-configured duration time.
2016-03-09 14:31:42 +01:00

50 lines
2.0 KiB
YAML

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:
- "@chill.main.helper.translatable_string"
tags:
- { name: form.type, alias: translatable_activity_reason }
chill.activity.form.type.translatableactivitytype:
class: Chill\ActivityBundle\Form\Type\TranslatableActivityType
arguments:
- "@request_stack"
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 }
chill.activity.security.authorization.activity_voter:
class: Chill\ActivityBundle\Security\Authorization\ActivityVoter
arguments:
- "@chill.main.security.authorization.helper"
tags:
- { name: security.voter }
- { name: chill.role }
chill.activity.timeline:
class: Chill\ActivityBundle\Timeline\TimelineActivityProvider
arguments:
- '@doctrine.orm.entity_manager'
- '@chill.main.security.authorization.helper'
- '@security.token_storage'
tags:
- { name: chill.timeline, context: 'person' }