]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Form/ApplicationType.php
Cleanup
[airbundle] / Form / ApplicationType.php
index 1107ac6d40b8b973b92b5f087439d586568de6d3..3e6f09753fb7accfaa6e2a4b31a836f44dab86cc 100644 (file)
@@ -59,10 +59,11 @@ class ApplicationType extends AbstractType {
         * {@inheritdoc}
         */
        public function configureOptions(OptionsResolver $resolver) {
-               $resolver->setDefaults(['error_bubbling' => true, 'admin' => false, 'return' => '', 'slot' => 3, 'user' => 0]);
+               //XXX: 1 should be the first user
+               $resolver->setDefaults(['error_bubbling' => true, 'admin' => false, 'return' => '', 'slot' => null, 'user' => 1]);
                $resolver->setAllowedTypes('admin', 'boolean');
                $resolver->setAllowedTypes('return', 'string');
-               $resolver->setAllowedTypes('slot', Slot::class);
+               $resolver->setAllowedTypes('slot', [Slot::class, 'null']);
                $resolver->setAllowedTypes('user', 'integer');
        }