addTemplateChoice($builder); $this->addDateRange($builder, ['timezone' => $options['timezone']]); $this->addCustomerMultiChoice($builder, ['required' => false, 'start_date_param' => null, 'end_date_param' => null, 'ignore_date' => true, 'placeholder' => ''], true); $this->addProjectMultiChoice($builder, ['ignore_date' => true], true, true); if ($options['include_export']) { $builder->add('markAsExported', MarkAsExportedType::class); } } protected function addTemplateChoice(FormBuilderInterface $builder) { $builder->add('template', InvoiceTemplateType::class, [ 'required' => true, 'placeholder' => null, ]); } /** * {@inheritdoc} */ public function configureOptions(OptionsResolver $resolver) { $resolver->setDefaults([ 'data_class' => InvoiceQuery::class, 'csrf_protection' => false, 'include_user' => true, 'include_export' => true, 'timezone' => date_default_timezone_get(), ]); } }