AbstractType   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 7
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A buildView() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the Silverback API Components Bundle Project
5
 *
6
 * (c) Daniel West <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Silverback\ApiComponentsBundle\Form;
15
16
use Silverback\ApiComponentsBundle\Helper\Form\FormSubmitHelper;
17
use Symfony\Component\Form\AbstractType as BaseAbstractType;
18
use Symfony\Component\Form\FormInterface;
19
use Symfony\Component\Form\FormView;
20
21
/**
22
 * @author Daniel West <[email protected]>
23
 */
24
class AbstractType extends BaseAbstractType implements FormTypeInterface
25
{
26
    public function buildView(FormView $view, FormInterface $form, array $options): void
27
    {
28
        $view->vars[FormSubmitHelper::FORM_REALTIME_VALIDATE_DISABLED] = $options[FormSubmitHelper::FORM_REALTIME_VALIDATE_DISABLED] ?? false;
29
        $view->vars[FormSubmitHelper::FORM_API_DISABLED] = $options[FormSubmitHelper::FORM_API_DISABLED] ?? false;
30
        $view->vars[FormSubmitHelper::FORM_POST_APP_PROXY] = $options[FormSubmitHelper::FORM_POST_APP_PROXY] ?? null;
31
    }
32
}
33