LabelField::html()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Mezon\Gui\Field;
3
4
/**
5
 * Class LabelField
6
 *
7
 * @package Field
8
 * @subpackage LabelField
9
 * @author Dodonov A.A.
10
 * @version v.1.0 (2019/09/04)
11
 * @copyright Copyright (c) 2019, http://aeon.su
12
 */
13
14
/**
15
 * Form header control
16
 */
17
class LabelField extends TextField
18
{
19
20
    /**
21
     * Generating input feld
22
     *
23
     * @return string HTML representation of the input field
24
     */
25
    public function html(): string
26
    {
27
        $content = '<div class="form-group col-md-12">';
28
        $content .= '<label class="control-label">' . $this->text . '</label>';
29
30
        return $content . '</div>';
31
    }
32
33
    /**
34
     * Getting field type
35
     *
36
     * @return string Field type
37
     */
38
    public function getType(): string
39
    {
40
        return 'label';
41
    }
42
43
    /**
44
     *
45
     * {@inheritdoc}
46
     * @see \Mezon\Gui\Control::fillAllRow()
47
     */
48
    public function fillAllRow(): bool
49
    {
50
        return true;
51
    }
52
}
53