- public function configureOptions(OptionsResolver $resolver) {
- //XXX: 1 should be the first user
- $resolver->setDefaults(['error_bubbling' => true, 'admin' => false, 'slot' => null, 'location' => null, 'user' => 1]);
- $resolver->setAllowedTypes('admin', 'boolean');
- $resolver->setAllowedTypes('location', [Location::class, 'null']);
- $resolver->setAllowedTypes('slot', [Slot::class, 'null']);
- $resolver->setAllowedTypes('user', 'integer');
+ public function configureOptions(OptionsResolver $resolver): void {
+ //Set defaults
+ $resolver->setDefaults(['error_bubbling' => true, 'dance_choices' => [], 'dance_default' => null, 'dance_favorites' => [], 'location_choices' => [], 'location_default' => null, 'location_favorites' => [], 'slot_default' => null, 'user' => true, 'user_choices' => [], 'user_default' => 1]);
+
+ //Add dance choices
+ $resolver->setAllowedTypes('dance_choices', 'array');
+
+ //Add dance default
+ $resolver->setAllowedTypes('dance_default', [Dance::class, 'null']);
+
+ //Add dance favorites
+ $resolver->setAllowedTypes('dance_favorites', 'array');
+
+ //Add location choices
+ $resolver->setAllowedTypes('location_choices', 'array');
+
+ //Add location default
+ $resolver->setAllowedTypes('location_default', [Location::class, 'null']);
+
+ //Add location favorites
+ $resolver->setAllowedTypes('location_favorites', 'array');
+
+ //Add slot default
+ $resolver->setAllowedTypes('slot_default', [Slot::class, 'null']);
+
+ //Add user field
+ $resolver->setAllowedTypes('user', 'boolean');
+
+ //Add user choices
+ $resolver->setAllowedTypes('user_choices', 'array');
+
+ //Add user default
+ $resolver->setAllowedTypes('user_default', 'integer');