Passed
Push — master ( 3b1e15...43df0a )
by Dmytro
04:55
created

UICheckBox::UICheckBox()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 2
b 0
f 0
nc 1
nop 2
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Asymptix\ui\components;
4
5
/**
6
 * CheckBox UI component class.
7
 *
8
 * @category Asymptix PHP Framework
9
 * @author Dmytro Zarezenko <[email protected]>
10
 * @copyright (c) 2009 - 2016, Dmytro Zarezenko
11
 *
12
 * @git https://github.com/Asymptix/Framework
13
 * @license http://opensource.org/licenses/MIT
14
 */
15
class UICheckBox extends \Asymptix\ui\UIComponent {
16
    /**
17
     * Default checkbox HTML template.
18
     */
19
    const DEFAULT_TEMPLATE = "core/ui/templates/components/ui_checkbox.tpl.php";
20
21
    /**
22
     * Makes the select field focused on page load (empty or 'autofocus', optional).
23
     *
24
     * @var string
25
     */
26
    protected $autofocus = "";
27
28
    /**
29
     * Specifies that the option should be disabled when it first loads
30
     *           (empty or 'disabled', optional).
31
     *
32
     * @var string
33
     */
34
    protected $disabled = "";
35
36
    /**
37
     * Defines one ore more forms the select field belongs to (optional).
38
     *
39
     * @var string
40
     */
41
    protected $form = "";
42
43
    /**
44
     * Defines the value of the option to be sent to the server.
45
     *
46
     * @var string,integer
47
     */
48
    protected $value = "";
49
50
    /**
51
     * Indicates that the input element should be checked when it first loads.
52
     *
53
     * @var bool
54
     */
55
    protected $checked = false;
56
57
    /**
58
     * Generate HTML of the list <input type="checkbox" ... /> element.
59
     *
60
     * @param array<string => string> $attributesList List of the component attributes.
61
     * @param string $template Path to the components template file.
62
     */
63
    public function __construct($attributesList, $template) {
64
        parent::__construct($attributesList, $template);
65
    }
66
}
67