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.
This commit is contained in:
2016-03-09 13:38:05 +01:00
parent f28a6e9fa0
commit 77b7333fea
9 changed files with 374 additions and 21 deletions

View File

@@ -42,6 +42,8 @@ class ChillActivityExtension extends Extension implements PrependExtensionInterf
{
$configuration = new Configuration();
$config = $this->processConfiguration($configuration, $configs);
$container->setParameter('chill_activity.form.time_duration', $config['form']['time_duration']);
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('services.yml');