Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
19 | class TextField implements Control |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Text content |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $text = ''; |
||
28 | |||
29 | /** |
||
30 | * Constructor |
||
31 | * |
||
32 | * @param array $fieldDescription |
||
33 | * Field description |
||
34 | */ |
||
35 | public function __construct(array $fieldDescription) |
||
36 | { |
||
37 | if (isset($fieldDescription['text'])) { |
||
38 | $this->text = $fieldDescription['text']; |
||
39 | } |
||
40 | } |
||
41 | |||
42 | /** |
||
43 | * Generating input feld |
||
44 | * |
||
45 | * @return string HTML representation of the input field |
||
46 | */ |
||
47 | public function html(): string |
||
48 | { |
||
49 | return $this->text; |
||
50 | } |
||
51 | |||
52 | /** |
||
53 | * Does control fills all row |
||
54 | */ |
||
55 | public function fillAllRow(): bool |
||
58 | } |
||
59 | } |
||
60 |