1 | <?php |
||
5 | class TextField extends Field |
||
6 | { |
||
7 | |||
8 | private $default_showLabel = false; |
||
9 | |||
10 | const ON_ENTER_NEXT = 'next'; |
||
11 | const ON_ENTER_SUBMIT = 'submit'; |
||
12 | |||
13 | private $onEnter = '', |
||
14 | $wrapNode = true, |
||
15 | $mask = null; |
||
16 | |||
17 | /** |
||
18 | * Whether to show the field's label by default |
||
19 | * |
||
20 | * @param boolean $default_showLabel |
||
21 | * |
||
22 | * @return $this |
||
23 | */ |
||
24 | public function setDefaultShowLabel ($default_showLabel) |
||
29 | |||
30 | public function getAttributes () |
||
39 | |||
40 | public function onEnter ($action = '') |
||
45 | |||
46 | /** |
||
47 | * Sets input mask for this field |
||
48 | * |
||
49 | * @param string $mask |
||
50 | * |
||
51 | * @return static |
||
52 | */ |
||
53 | public function setMask ($mask) |
||
58 | |||
59 | public function getClasses () |
||
65 | |||
66 | /** |
||
67 | * Sets whether to wrap the node in an input-field node |
||
68 | * |
||
69 | * @param boolean $wrapNode |
||
70 | * |
||
71 | * @return static |
||
72 | */ |
||
73 | public function setWrapNode ($wrapNode) |
||
78 | |||
79 | /** |
||
80 | * @param bool|null $showLabel |
||
81 | * @return string |
||
82 | */ |
||
83 | public function getHTML ($showLabel = null) |
||
99 | |||
100 | } |