| @@ 420-424 (lines=5) @@ | ||
| 417 | $sections = static::getERSections(); |
|
| 418 | $options = array(); |
|
| 419 | ||
| 420 | foreach ($sections as $section) { |
|
| 421 | $driver = $section->get('id'); |
|
| 422 | $selected = $driver === $this->get('linked_section_id'); |
|
| 423 | $options[] = array($driver, $selected, General::sanitize($section->get('name'))); |
|
| 424 | } |
|
| 425 | ||
| 426 | return Widget::Select($name, $options); |
|
| 427 | } |
|
| @@ 1106-1110 (lines=5) @@ | ||
| 1103 | $options = array(); |
|
| 1104 | $selectedSections = $this->getSelectedSectionsArray(); |
|
| 1105 | ||
| 1106 | foreach ($sections as $section) { |
|
| 1107 | $driver = $section->get('id'); |
|
| 1108 | $selected = in_array($driver, $selectedSections); |
|
| 1109 | $options[] = array($driver, $selected, General::sanitize($section->get('name'))); |
|
| 1110 | } |
|
| 1111 | ||
| 1112 | return Widget::Select($name, $options, array('multiple' => 'multiple')); |
|
| 1113 | } |
|