|
1
|
|
|
<?php |
|
2
|
|
|
/** |
|
3
|
|
|
* WebHemi. |
|
4
|
|
|
* |
|
5
|
|
|
* PHP version 7.1 |
|
6
|
|
|
* |
|
7
|
|
|
* @copyright 2012 - 2017 Gixx-web (http://www.gixx-web.com) |
|
8
|
|
|
* @license https://opensource.org/licenses/MIT The MIT License (MIT) |
|
9
|
|
|
* |
|
10
|
|
|
* @link http://www.gixx-web.com |
|
11
|
|
|
*/ |
|
12
|
|
|
declare(strict_types = 1); |
|
13
|
|
|
|
|
14
|
|
|
namespace WebHemi\Form\Html; |
|
15
|
|
|
|
|
16
|
|
|
/** |
|
17
|
|
|
* Class HtmlFormElement |
|
18
|
|
|
*/ |
|
19
|
|
|
class HtmlFormElement extends AbstractHtmlFormElement |
|
20
|
|
|
{ |
|
21
|
|
|
public const HTML_ELEMENT_BUTTON = 'button'; |
|
22
|
|
|
public const HTML_ELEMENT_FORM = 'form'; |
|
23
|
|
|
public const HTML_ELEMENT_INPUT_CHECKBOX = 'checkbox'; |
|
24
|
|
|
public const HTML_ELEMENT_INPUT_FILE = 'file'; |
|
25
|
|
|
public const HTML_ELEMENT_INPUT_HIDDEN = 'hidden'; |
|
26
|
|
|
public const HTML_ELEMENT_INPUT_IMAGE = 'IMAGE'; |
|
27
|
|
|
public const HTML_ELEMENT_INPUT_PASSWORD = 'password'; |
|
28
|
|
|
public const HTML_ELEMENT_INPUT_RADIO = 'radio'; |
|
29
|
|
|
public const HTML_ELEMENT_INPUT_RESET = 'reset'; |
|
30
|
|
|
public const HTML_ELEMENT_INPUT_SUBMIT = 'submit'; |
|
31
|
|
|
public const HTML_ELEMENT_INPUT_TEXT = 'text'; |
|
32
|
|
|
public const HTML_ELEMENT_SELECT = 'select'; |
|
33
|
|
|
public const HTML_ELEMENT_TEXTAREA = 'textarea'; |
|
34
|
|
|
|
|
35
|
|
|
/** @var array */ |
|
36
|
|
|
protected $validTypes = [ |
|
37
|
|
|
self::HTML_ELEMENT_BUTTON, |
|
38
|
|
|
self::HTML_ELEMENT_FORM, |
|
39
|
|
|
self::HTML_ELEMENT_INPUT_CHECKBOX, |
|
40
|
|
|
self::HTML_ELEMENT_INPUT_FILE, |
|
41
|
|
|
self::HTML_ELEMENT_INPUT_HIDDEN, |
|
42
|
|
|
self::HTML_ELEMENT_INPUT_IMAGE, |
|
43
|
|
|
self::HTML_ELEMENT_INPUT_PASSWORD, |
|
44
|
|
|
self::HTML_ELEMENT_INPUT_RADIO, |
|
45
|
|
|
self::HTML_ELEMENT_INPUT_RESET, |
|
46
|
|
|
self::HTML_ELEMENT_INPUT_SUBMIT, |
|
47
|
|
|
self::HTML_ELEMENT_INPUT_TEXT, |
|
48
|
|
|
self::HTML_ELEMENT_SELECT, |
|
49
|
|
|
self::HTML_ELEMENT_TEXTAREA, |
|
50
|
|
|
]; |
|
51
|
|
|
} |
|
52
|
|
|
|