@@ -11,7 +11,6 @@ |
||
| 11 | 11 | */ |
| 12 | 12 | |
| 13 | 13 | use OSC\OM\Cache; |
| 14 | - use OSC\OM\FileSystem; |
|
| 15 | 14 | use OSC\OM\HTTP; |
| 16 | 15 | use OSC\OM\OSCOM; |
| 17 | 16 | use OSC\OM\Registry; |
@@ -90,6 +90,10 @@ discard block |
||
| 90 | 90 | return $image; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $name |
|
| 95 | + * @param string $action |
|
| 96 | + */ |
|
| 93 | 97 | public static function form($name, $action, $method = 'post', $parameters = '', array $flags = []) |
| 94 | 98 | { |
| 95 | 99 | if (!isset($flags['tokenize']) || !is_bool($flags['tokenize'])) { |
@@ -162,6 +166,9 @@ discard block |
||
| 162 | 166 | return static::inputField($name, null, $parameters, 'file', false); |
| 163 | 167 | } |
| 164 | 168 | |
| 169 | + /** |
|
| 170 | + * @param string $type |
|
| 171 | + */ |
|
| 165 | 172 | protected static function selectionField($name, $type, $value = '', $checked = false, $parameters = '') |
| 166 | 173 | { |
| 167 | 174 | $selection = '<input type="' . static::output($type) . '" name="' . static::output($name) . '"'; |
@@ -183,6 +190,9 @@ discard block |
||
| 183 | 190 | return $selection; |
| 184 | 191 | } |
| 185 | 192 | |
| 193 | + /** |
|
| 194 | + * @param string $name |
|
| 195 | + */ |
|
| 186 | 196 | public static function checkboxField($name, $value = '', $checked = false, $parameters = '') |
| 187 | 197 | { |
| 188 | 198 | return static::selectionField($name, 'checkbox', $value, $checked, $parameters); |
@@ -193,6 +203,11 @@ discard block |
||
| 193 | 203 | return static::selectionField($name, 'radio', $value, $checked, $parameters); |
| 194 | 204 | } |
| 195 | 205 | |
| 206 | + /** |
|
| 207 | + * @param string $name |
|
| 208 | + * @param integer $width |
|
| 209 | + * @param integer $height |
|
| 210 | + */ |
|
| 196 | 211 | public static function textareaField($name, $width, $height, $text = '', $parameters = '', $reinsert_value = true, $class = 'form-control') |
| 197 | 212 | { |
| 198 | 213 | $field = '<textarea name="' . static::output($name) . '" cols="' . static::output($width) . '" rows="' . static::output($height) . '"'; |
@@ -312,6 +327,10 @@ discard block |
||
| 312 | 327 | return $field; |
| 313 | 328 | } |
| 314 | 329 | |
| 330 | + /** |
|
| 331 | + * @param string $icon |
|
| 332 | + * @param string $link |
|
| 333 | + */ |
|
| 315 | 334 | public static function button($title = null, $icon = null, $link = null, $params = null, $class = null) |
| 316 | 335 | { |
| 317 | 336 | $types = ['submit', 'button', 'reset']; |