From: Raphaƫl Gertz Date: Wed, 11 Dec 2019 08:25:27 +0000 (+0100) Subject: Set slot as nullable X-Git-Tag: 0.1.1~16 X-Git-Url: https://git.rapsys.eu/airbundle/commitdiff_plain/d458958d9f2bff86eef468ce0502bc281aab8c8e?hp=5a1c2978daafdf0ffed02ee261668d4f6d3342a7 Set slot as nullable Set default user to 1 --- diff --git a/Form/ApplicationType.php b/Form/ApplicationType.php index 1107ac6..3e6f097 100644 --- a/Form/ApplicationType.php +++ b/Form/ApplicationType.php @@ -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'); }