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

SupportAdminComment::buildForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 28

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 28
rs 9.472
c 0
b 0
f 0
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