FixDisabledBugOptionsBuilder   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 10
rs 10
c 1
b 0
f 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
1
<?php
2
3
namespace steevanb\SymfonyFormOptionsBuilder\OptionsBuilder;
4
5
/**
6
 * Use it to fix disabled configuration bug :
7
 * If all your fields are disabled, your browser doesn't send anything
8
 * In this case, Symfony understand that you want to delete element, instead of do not modify it.
9
 * You have to call form_widget(form.foo) in your template to write this input in HTML
10
 */
11
class FixDisabledBugOptionsBuilder extends HiddenOptionsBuilder
12
{
13
    public function __construct()
14
    {
15
        $this
16
            ->setMapped(false)
17
            ->setLabel(false)
18
            ->setTranslationDomain(false);
19
    }
20
}
21