Completed
Pull Request — development (#825)
by
unknown
06:18
created

SupportSQLFlexForm   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 54
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 51 1
1
<?php
2
3
namespace Oc\Form;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
7
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
8
use Symfony\Component\Form\FormBuilderInterface;
9
10
class SupportSQLFlexForm extends AbstractType
11
{
12
    public function buildForm(FormBuilderInterface $builder, array $options)
13
    {
14
        // see: https://symfonycasts.com/screencast/symfony-forms/form-type-class
15
        $builder
16
            ->add(
17
                'content_SELECT', ChoiceType::class, [
18
                                    'choices' => ['SELECT' => 'SELECT'],
19
                                    'attr' => [
20
                                        'style' => 'width: 300px;'
21
                                    ],
22
                                    'disabled' => true,
23
                                    'label' => false,
24
                                    'trim' => true
25
                                ]
26
            )
27
            ->add(
28
                'content_WHAT', null, [
29
                                  'required' => true,
30
                                  'data' => '*',
31
                                  'attr' => [
32
                                      'style' => 'width: 300px;'
33
                                  ],
34
                                  'disabled' => false,
35
                                  'label' => false,
36
                                  'trim' => true
37
                              ]
38
            )
39
            ->add(
40
                'content_FROM', ChoiceType::class, [
41
                                  'choices' => ['FROM' => 'FROM'],
42
                                  'attr' => [
43
                                      'style' => 'width: 300px;'
44
                                  ],
45
                                  'disabled' => true,
46
                                  'label' => false,
47
                                  'trim' => true
48
                              ]
49
            )
50
            ->add(
51
                'content_TABLE', ChoiceType::class, [
52
                                   'choices' => ['caches' => 'caches', 'user' => 'user',],
53
                                   'attr' => [
54
                                       'style' => 'width: 300px;'
55
                                   ],
56
                                   'disabled' => false,
57
                                   'label' => false,
58
                                   'trim' => true
59
                               ]
60
            )
61
            ->add('Suchen', SubmitType::class, ['attr' => ['class' => 'btn btn-primary']]);
62
    }
63
}
64