| @@ 240-254 (lines=15) @@ | ||
| 237 | * @param string $sep |
|
| 238 | * @return XoopsFormSelect |
|
| 239 | */ |
|
| 240 | public static function getList($name, $caption, $defaut, $options, $sep = ';') |
|
| 241 | { |
|
| 242 | global $xoopsUser; |
|
| 243 | ||
| 244 | $select = new \XoopsFormSelect($caption, $name, $defaut); |
|
| 245 | if (!is_array($options)) { |
|
| 246 | $options = explode($sep, $options); |
|
| 247 | } |
|
| 248 | ||
| 249 | for ($h = 0, $count = count($options); $h < $count; ++$h) { |
|
| 250 | $select->addOption($h, $options[$h]); |
|
| 251 | } |
|
| 252 | ||
| 253 | return $select; |
|
| 254 | } |
|
| 255 | ||
| 256 | /******************************************************************* |
|
| 257 | * |
|
| @@ 227-241 (lines=15) @@ | ||
| 224 | * @param string $sep |
|
| 225 | * @return XoopsFormSelect |
|
| 226 | */ |
|
| 227 | function getList($name, $caption, $defaut, $options, $sep = ';') |
|
| 228 | { |
|
| 229 | global $xoopsUser; |
|
| 230 | ||
| 231 | $select = new \XoopsFormSelect($caption, $name, $defaut); |
|
| 232 | if (!is_array($options)) { |
|
| 233 | $options = explode($sep, $options); |
|
| 234 | } |
|
| 235 | ||
| 236 | for ($h = 0, $count = count($options); $h < $count; ++$h) { |
|
| 237 | $select->addOption($h, $options[$h]); |
|
| 238 | } |
|
| 239 | ||
| 240 | return $select; |
|
| 241 | } |
|
| 242 | ||
| 243 | /******************************************************************* |
|
| 244 | * |
|