FormHeader::html()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

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