1 | <?php |
||
13 | class HtmlFormField extends HtmlSemDoubleElement { |
||
14 | use FieldTrait; |
||
15 | protected $_container; |
||
16 | protected $_validation; |
||
17 | public function __construct($identifier, $field,$label=NULL) { |
||
26 | |||
27 | public function addPointingLabel($label,$pointing=Direction::NONE){ |
||
33 | |||
34 | public function setLabel($label){ |
||
43 | |||
44 | public function setField($field){ |
||
47 | |||
48 | /** |
||
49 | * Returns the label or null |
||
50 | * @return mixed |
||
51 | */ |
||
52 | public function getLabel(){ |
||
56 | |||
57 | /** |
||
58 | * Return the field |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function getField(){ |
||
64 | |||
65 | /** |
||
66 | * Return the field with data |
||
67 | * @return mixed |
||
68 | */ |
||
69 | public function getDataField(){ |
||
72 | |||
73 | /** |
||
74 | * puts the label before or behind |
||
75 | */ |
||
76 | public function swapLabel(){ |
||
81 | |||
82 | /** |
||
83 | * Defines the field width |
||
84 | * @param int $width |
||
85 | * @return \Ajax\semantic\html\collections\form\HtmlFormField |
||
86 | */ |
||
87 | public function setWidth($width){ |
||
97 | |||
98 | /** |
||
99 | * Field displays an error state |
||
100 | * @return \Ajax\semantic\html\collections\form\HtmlFormField |
||
101 | */ |
||
102 | public function setError(){ |
||
105 | |||
106 | public function setInline(){ |
||
109 | |||
110 | public function jsState($state){ |
||
113 | |||
114 | public function setContainer($_container) { |
||
118 | |||
119 | public function setReadonly(){ |
||
122 | |||
123 | public function addRule($type,$prompt=NULL,$value=NULL){ |
||
136 | |||
137 | public function addRules(array $rules){ |
||
143 | |||
144 | public function addIcon($icon,$direction=Direction::LEFT){ |
||
148 | |||
149 | public function getValidation() { |
||
152 | } |