| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 58 | public function build_multi_select(array $option_ary, $selected_items, $field) |
||
| 59 | { |
||
| 60 | $selected_items = cfg_utils::ensure_array($selected_items); |
||
| 61 | |||
| 62 | $html = '<select id="' . $field . '" name="config[' . $field . '][]" multiple="multiple">'; |
||
| 63 | foreach ($option_ary as $value => $title) |
||
| 64 | { |
||
| 65 | $selected = cfg_utils::get_selected_option($value, $selected_items); |
||
| 66 | $html .= '<option value="' . $value . '"' . $selected . '>' . $this->translator->lang($title) . '</option>'; |
||
| 67 | } |
||
| 68 | $html .= '</select>'; |
||
| 69 | |||
| 70 | return $html; |
||
| 71 | } |
||
| 73 |