Completed
Pull Request — development (#829)
by
unknown
04:35
created

SupportAdminComment   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildForm() 0 28 1
1
<?php
2
3
namespace Oc\Form;
4
5
use Symfony\Component\Form\AbstractType;
6
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
7
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
8
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
9
use Symfony\Component\Form\FormBuilderInterface;
10
11
/**
12
 * Class SupportAdminComment
13
 *
14
 * @package Oc\Form
15
 */
16
class SupportAdminComment extends AbstractType
17
{
18
    /**
19
     * @param FormBuilderInterface $builder
20
     * @param array $options
21
     */
22
    public function buildForm(FormBuilderInterface $builder, array $options)
23
    {
24
        $builder
25
            ->add(
26
                'support_admin_comment', TextareaType::class, [
27
                                           'attr' => [
28
                                               'maxlength' => '32000',
29
                                               'overflow' => 'auto',
30
                                               'rows' => '10',
31
                                           ],
32
                                           'required' => false,
33
                                           'disabled' => false,
34
                                           'label' => false,
35
                                           'trim' => true
36
                                       ]
37
            )
38
            ->add(
39
                'save_admin_comment', SubmitType::class, [
40
                                        'attr' => ['class' => 'btn btn-primary', 'style' => 'width: 180px;'],
41
                                        'label' => '💾'
42
                                    ]
43
            )
44
            ->add(
45
                'hidden_repID', HiddenType::class, [
46
                                  'attr' => ['maxlength' => '10'],
47
                              ]
48
            );
49
    }
50
}
51