| @@ 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 | } |
|
| @@ 1144-1148 (lines=5) @@ | ||
| 1141 | $options = array(); |
|
| 1142 | $selectedSections = $this->getSelectedSectionsArray(); |
|
| 1143 | ||
| 1144 | foreach ($sections as $section) { |
|
| 1145 | $driver = $section->get('id'); |
|
| 1146 | $selected = in_array($driver, $selectedSections); |
|
| 1147 | $options[] = array($driver, $selected, General::sanitize($section->get('name'))); |
|
| 1148 | } |
|
| 1149 | ||
| 1150 | return Widget::Select($name, $options, array('multiple' => 'multiple')); |
|
| 1151 | } |
|