1
1
<?php
2
-
3
2
namespace Ajax \semantic \traits ;
4
3
5
4
use Ajax \semantic \html \elements \HtmlButtonGroups ;
25
24
use Ajax \common \html \BaseHtml ;
26
25
use Ajax \semantic \html \base \HtmlSemDoubleElement ;
27
26
use Ajax \semantic \html \elements \HtmlEmoji ;
27
+ use Ajax \semantic \html \elements \HtmlRail ;
28
28
29
29
trait SemanticHtmlElementsTrait {
30
30
@@ -36,6 +36,7 @@ public function addState($state, $elements) {
36
36
37
37
/**
38
38
* Return a new Semantic Html Button
39
+ *
39
40
* @see http://phpmv-ui.kobject.net/index/direct/main/31
40
41
* @see http://semantic-ui.com/elements/button.html
41
42
* @param string $identifier
@@ -44,49 +45,53 @@ public function addState($state, $elements) {
44
45
* @param string $onClick
45
46
* @return HtmlButton
46
47
*/
47
- public function htmlButton ($ identifier , $ value= null , $ cssStyle= null , $ onClick= null ) {
48
+ public function htmlButton ($ identifier , $ value = null , $ cssStyle = null , $ onClick = null ) {
48
49
return $ this ->addHtmlComponent (new HtmlButton ($ identifier , $ value , $ cssStyle , $ onClick ));
49
50
}
50
51
51
52
/**
52
53
* Returns a group of Semantic buttons
54
+ *
53
55
* @see http://phpmv-ui.kobject.net/index/direct/main/50
54
56
* @see http://semantic-ui.com/elements/button.html#buttons
55
57
* @param string $identifier
56
58
* @param array $elements
57
59
* @param boolean $asIcons
58
60
* @return HtmlButtonGroups
59
61
*/
60
- public function htmlButtonGroups ($ identifier , $ elements= array (), $ asIcons= false ) {
62
+ public function htmlButtonGroups ($ identifier , $ elements = array (), $ asIcons = false ) {
61
63
return $ this ->addHtmlComponent (new HtmlButtonGroups ($ identifier , $ elements , $ asIcons ));
62
64
}
63
65
64
66
/**
65
67
* Returns a new Semantic container
68
+ *
66
69
* @see http://phpmv-ui.kobject.net/index/direct/main/34
67
70
* @see http://semantic-ui.com/elements/container.html
68
71
* @param string $identifier
69
72
* @param string $content
70
73
* @return HtmlContainer
71
74
*/
72
- public function htmlContainer ($ identifier , $ content= "" ) {
75
+ public function htmlContainer ($ identifier , $ content = "" ) {
73
76
return $ this ->addHtmlComponent (new HtmlContainer ($ identifier , $ content ));
74
77
}
75
78
76
79
/**
77
80
* Returns a new Semantic divider
81
+ *
78
82
* @see http://phpmv-ui.kobject.net/index/direct/main/42
79
83
* @see http://semantic-ui.com/elements/divider.html
80
84
* @param string $identifier
81
85
* @param string $content
82
86
* @return HtmlDivider
83
87
*/
84
- public function htmlDivider ($ identifier , $ content= "" , $ tagName= "div " ) {
88
+ public function htmlDivider ($ identifier , $ content = "" , $ tagName = "div " ) {
85
89
return $ this ->addHtmlComponent (new HtmlDivider ($ identifier , $ content , $ tagName ));
86
90
}
87
91
88
92
/**
89
93
* Returns a new Semantic header
94
+ *
90
95
* @see http://phpmv-ui.kobject.net/index/direct/main/43
91
96
* @see http://semantic-ui.com/elements/header.html
92
97
* @param string $identifier
@@ -95,12 +100,13 @@ public function htmlDivider($identifier, $content="", $tagName="div") {
95
100
* @param string $type
96
101
* @return HtmlHeader
97
102
*/
98
- public function htmlHeader ($ identifier , $ niveau= 1 , $ content= NULL , $ type= "page " ) {
103
+ public function htmlHeader ($ identifier , $ niveau = 1 , $ content = NULL , $ type = "page " ) {
99
104
return $ this ->addHtmlComponent (new HtmlHeader ($ identifier , $ niveau , $ content , $ type ));
100
105
}
101
106
102
107
/**
103
108
* Returns a new Semantic icon
109
+ *
104
110
* @see http://phpmv-ui.kobject.net/index/direct/main/44
105
111
* @see http://semantic-ui.com/elements/icon.html
106
112
* @param string $identifier
@@ -113,6 +119,7 @@ public function htmlIcon($identifier, $icon) {
113
119
114
120
/**
115
121
* Returns a new Semantic image
122
+ *
116
123
* @see http://phpmv-ui.kobject.net/index/direct/main/55
117
124
* @see http://semantic-ui.com/elements/image.html
118
125
* @param string $identifier
@@ -121,25 +128,27 @@ public function htmlIcon($identifier, $icon) {
121
128
* @param string $size
122
129
* @return HtmlImage
123
130
*/
124
- public function htmlImage ($ identifier , $ src= "" , $ alt= "" , $ size= NULL ) {
131
+ public function htmlImage ($ identifier , $ src = "" , $ alt = "" , $ size = NULL ) {
125
132
return $ this ->addHtmlComponent (new HtmlImage ($ identifier , $ src , $ alt , $ size ));
126
133
}
127
134
128
135
/**
129
136
* Returns a new Semantic group of images
137
+ *
130
138
* @see http://phpmv-ui.kobject.net/index/direct/main/0
131
139
* @see http://semantic-ui.com/elements/image.html#size
132
140
* @param string $identifier
133
141
* @param array $icons
134
142
* @param string $size
135
143
* @return HtmlIconGroups
136
144
*/
137
- public function htmlIconGroups ($ identifier , $ icons= array (), $ size= "" ) {
145
+ public function htmlIconGroups ($ identifier , $ icons = array (), $ size = "" ) {
138
146
return $ this ->addHtmlComponent (new HtmlIconGroups ($ identifier , $ icons , $ size ));
139
147
}
140
148
141
149
/**
142
150
* Returns a new Semantic html input
151
+ *
143
152
* @see http://phpmv-ui.kobject.net/index/direct/main/45
144
153
* @see http://semantic-ui.com/elements/input.html
145
154
* @param string $identifier
@@ -148,64 +157,71 @@ public function htmlIconGroups($identifier, $icons=array(), $size="") {
148
157
* @param string $placeholder
149
158
* @return HtmlInput
150
159
*/
151
- public function htmlInput ($ identifier , $ type= "text " , $ value= "" , $ placeholder= "" ) {
160
+ public function htmlInput ($ identifier , $ type = "text " , $ value = "" , $ placeholder = "" ) {
152
161
return $ this ->addHtmlComponent (new HtmlInput ($ identifier , $ type , $ value , $ placeholder ));
153
162
}
154
163
155
164
/**
156
165
* Returns a new Semantic label
166
+ *
157
167
* @see http://phpmv-ui.kobject.net/index/direct/main/46
158
168
* @see http://semantic-ui.com/elements/label.html
159
169
* @param string $identifier
160
170
* @param string $content
161
171
* @param string $tagName
162
172
* @return HtmlLabel
163
173
*/
164
- public function htmlLabel ($ identifier , $ content= "" , $ icon= NULL ,$ tagName= "div " ) {
165
- return $ this ->addHtmlComponent (new HtmlLabel ($ identifier , $ content ,$ icon , $ tagName ));
174
+ public function htmlLabel ($ identifier , $ content = "" , $ icon = NULL , $ tagName = "div " ) {
175
+ return $ this ->addHtmlComponent (new HtmlLabel ($ identifier , $ content , $ icon , $ tagName ));
166
176
}
167
177
168
178
/**
179
+ *
169
180
* @param string $identifier
170
181
* @param array $labels
171
182
* @param array $attributes
172
183
* @return HtmlLabelGroups
173
184
*/
174
- public function htmlLabelGroups ($ identifier ,$ labels= array (),$ attributes= array ()){
175
- return $ this ->addHtmlComponent (new HtmlLabelGroups ($ identifier ,$ labels ,$ attributes ));
185
+ public function htmlLabelGroups ($ identifier , $ labels = array (), $ attributes = array ()) {
186
+ return $ this ->addHtmlComponent (new HtmlLabelGroups ($ identifier , $ labels , $ attributes ));
176
187
}
177
188
178
189
/**
190
+ * Returns a new Semantic list.
179
191
*
180
192
* @param string $identifier
181
193
* @param array $items
182
194
* @return HtmlList
183
195
*/
184
- public function htmlList ($ identifier , $ items= array ()) {
196
+ public function htmlList ($ identifier , $ items = array ()) {
185
197
return $ this ->addHtmlComponent (new HtmlList ($ identifier , $ items ));
186
198
}
187
199
188
200
/**
189
- * Adds a new segment, used to create a grouping of related content
201
+ * Adds a new segment, used to create a grouping of related content.
202
+ *
190
203
* @param string $identifier
191
204
* @param string $content
192
205
* @return HtmlSegment
193
206
*/
194
- public function htmlSegment ($ identifier , $ content= "" ) {
207
+ public function htmlSegment ($ identifier , $ content = "" ) {
195
208
return $ this ->addHtmlComponent (new HtmlSegment ($ identifier , $ content ));
196
209
}
197
210
198
211
/**
199
212
* Adds a group of segments
213
+ *
200
214
* @param string $identifier
201
- * @param array $items the segments
215
+ * @param array $items
216
+ * the segments
202
217
* @return HtmlSegmentGroups
203
218
*/
204
- public function htmlSegmentGroups ($ identifier , $ items= array ()) {
219
+ public function htmlSegmentGroups ($ identifier , $ items = array ()) {
205
220
return $ this ->addHtmlComponent (new HtmlSegmentGroups ($ identifier , $ items ));
206
221
}
207
222
208
223
/**
224
+ * Returns a new Semantic Reveal.
209
225
*
210
226
* @param string $identifier
211
227
* @param string|HtmlSemDoubleElement $visibleContent
@@ -214,34 +230,52 @@ public function htmlSegmentGroups($identifier, $items=array()) {
214
230
* @param Direction|string $attributeType
215
231
* @return HtmlReveal
216
232
*/
217
- public function htmlReveal ($ identifier , $ visibleContent , $ hiddenContent , $ type= RevealType::FADE , $ attributeType= NULL ) {
233
+ public function htmlReveal ($ identifier , $ visibleContent , $ hiddenContent , $ type = RevealType::FADE , $ attributeType = NULL ) {
218
234
return $ this ->addHtmlComponent (new HtmlReveal ($ identifier , $ visibleContent , $ hiddenContent , $ type , $ attributeType ));
219
235
}
220
236
221
237
/**
238
+ * Returns a new Semantic Step.
239
+ *
222
240
* @param string $identifier
223
241
* @param array $steps
224
242
* @return HtmlStep
225
243
*/
226
- public function htmlStep ($ identifier , $ steps= array ()) {
244
+ public function htmlStep ($ identifier , $ steps = array ()) {
227
245
return $ this ->addHtmlComponent (new HtmlStep ($ identifier , $ steps ));
228
246
}
229
247
230
248
/**
249
+ *
250
+ * Returns a new Semantic Flag.
251
+ *
231
252
* @param string $identifier
232
253
* @param string $flag
233
254
* @return HtmlFlag
234
255
*/
235
256
public function htmlFlag ($ identifier , $ flag ) {
236
257
return $ this ->addHtmlComponent (new HtmlFlag ($ identifier , $ flag ));
237
258
}
238
-
259
+
239
260
/**
261
+ * Returns a new Semantic Emoji.
262
+ *
240
263
* @param string $identifier
241
264
* @param string $emoji
242
265
* @return HtmlEmoji
243
266
*/
244
267
public function htmlEmoji ($ identifier , $ emoji ) {
245
268
return $ this ->addHtmlComponent (new HtmlEmoji ($ identifier , $ emoji ));
246
269
}
270
+
271
+ /**
272
+ * Returns a new Semantic Rail.
273
+ *
274
+ * @param string $identifier
275
+ * @param mixed $content
276
+ * @return HtmlRail
277
+ */
278
+ public function htmlRail ($ identifier , $ content = null ) {
279
+ return $ this ->addHtmlComponent (new HtmlRail ($ identifier , $ content ));
280
+ }
247
281
}
0 commit comments