| @@ 341-345 (lines=5) @@ | ||
| 338 | $sections = static::getERSections(); |
|
| 339 | $options = array(); |
|
| 340 | ||
| 341 | foreach ($sections as $section) { |
|
| 342 | $driver = $section->get('id'); |
|
| 343 | $selected = $driver === $this->get('linked_section_id'); |
|
| 344 | $options[] = array($driver, $selected, General::sanitize($section->get('name'))); |
|
| 345 | } |
|
| 346 | ||
| 347 | return Widget::Select($name, $options); |
|
| 348 | } |
|
| @@ 993-997 (lines=5) @@ | ||
| 990 | $options = array(); |
|
| 991 | $selectedSections = $this->getSelectedSectionsArray(); |
|
| 992 | ||
| 993 | foreach ($sections as $section) { |
|
| 994 | $driver = $section->get('id'); |
|
| 995 | $selected = in_array($driver, $selectedSections); |
|
| 996 | $options[] = array($driver, $selected, General::sanitize($section->get('name'))); |
|
| 997 | } |
|
| 998 | ||
| 999 | return Widget::Select($name, $options, array('multiple' => 'multiple')); |
|
| 1000 | } |
|