InputDate   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 6

1 Method

Rating   Name   Duplication   Size   Complexity  
A html() 0 7 6
1
<?php
2
namespace Mezon\Gui\Field;
3
4
use Mezon\Gui\Field;
5
6
/**
7
 * Class InputDate
8
 *
9
 * @package Field
10
 * @subpackage InputDate
11
 * @author Dodonov A.A.
12
 * @version v.1.0 (2019/09/13)
13
 * @copyright Copyright (c) 2019, http://aeon.su
14
 */
15
16
/**
17
 * Input field control
18
 */
19
class InputDate extends Field
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
        return '<input class="' . $this->class . ' date-input""' . ($this->required ? ' required="required"' : '') .
30
            ' type="text" name="' . $this->getNamePrefix() . $this->name .
31
            ($this->batch ? '[{_creation_form_items_counter}]' : '') . '"' . ($this->disabled ? ' disabled ' : '') .
32
            ($this->toggler === '' ? '' : 'toggler="' . $this->toggler . '" ') .
33
            ($this->toggler === '' ? '' : 'toggle-value="') . $this->toggleValue . '"' . '>';
34
    }
35
}
36