title: Symfony Form - form type options inside form class or Twig functions?
body: <p>It's a little hard to specify it in the title so I'm going to give a specific example. 
  I created form class called <strong>FlashcardType</strong> in which I have <code>buildForm()</code> method and following code inside</p>
  
  <pre><code>public function buildForm(FormBuilderInterface $builder, array $options) 
  {
      $builder
          -&gt;add('exampleSentence', CheckboxType::class, [
               'label' =&gt; 'Example sentence'
          ])
          -&gt;add('pronunciation', CheckboxType::class, [
              'label' =&gt; 'Pronunciation'
          ])
          -&gt;add('sortBy', ChoiceType::class, [
              'label' =&gt; 'Sort by',
              'choices' =&gt; [
                  'Date increase' =&gt; 1,
                  'Date decrease' =&gt; 2,
                  'Word alphabetically' =&gt; 3,
                  'Word not alphabetically' =&gt; 4
              ]
          ])
          -&gt;add('save', SubmitType::class, [
              'label' =&gt; 'Submit'
      ]);
  }
  </code></pre>
  
  <p>So the result form will contain 2 <em>checkboxes</em>, one <em>select drop-down</em> and <em>submit button</em>.
  Inside the controller I pass this form to view by createView() method.</p>
  
  <p>And to make this question shorter let's take only this first checkbox as example.
  So inside Twig file I have the code as follows:</p>
  
  <pre><code>{# ...form code... #}
  &lt;div class="form-check form-check-inline mr-4"&gt;
      {{ form_widget(form.exampleSentence, {'attr': {'class': 'form-check-input'}}) }}
      {{ form_label(form.exampleSentence, null, {
          'label_attr': {'class': 'form-check-label'}
      }) }}
  &lt;/div&gt;
  {# ...form code... #}
  </code></pre>
  
  <p>For checkbox type (and not only) we can set <a href="https://symfony.com/doc/current/reference/forms/types/checkbox.html" rel="nofollow noreferrer">options outputted in the table</a> while creating form by <code>formBuilder()</code>. But <a href="https://symfony.com/doc/current/form/form_customization.html#form-variables-reference" rel="nofollow noreferrer">many of these options</a> we can override in Twig functions. 
  For this first checkbox I set label inside <code>buildForm()</code> but I can also set it inside <code>{{ form_label() }}</code> Twig function. And I can make it for many (if not for every) option and types.</p>
  
  <p>So what's the difference between wrtiting options inside form builder and Twig form functions? Which of these options should we write inside builder and which of these inside Twig? Are there some good practices in this case? </p>
  
  <p>Thank you in advance for all answers!</p>