@@ 438-448 (lines=11) @@ | ||
435 | $events = ResourceManager::fetch(ResourceManager::RESOURCE_TYPE_EVENT, array(), array(), 'name ASC'); |
|
436 | $options = array(); |
|
437 | ||
438 | if (is_array($events) && !empty($events)) { |
|
439 | if (!isset($fields['events'])) { |
|
440 | $fields['events'] = array(); |
|
441 | } |
|
442 | ||
443 | foreach ($events as $name => $about) { |
|
444 | $options[] = array( |
|
445 | $name, in_array($name, $fields['events']), $about['name'] |
|
446 | ); |
|
447 | } |
|
448 | } |
|
449 | ||
450 | $label->appendChild(Widget::Select('fields[events][]', $options, array('multiple' => 'multiple'))); |
|
451 | $group->appendChild($label); |
|
@@ 461-471 (lines=11) @@ | ||
458 | $datasources = ResourceManager::fetch(ResourceManager::RESOURCE_TYPE_DS, array(), array(), 'name ASC'); |
|
459 | $options = array(); |
|
460 | ||
461 | if (is_array($datasources) && !empty($datasources)) { |
|
462 | if (!isset($fields['data_sources'])) { |
|
463 | $fields['data_sources'] = array(); |
|
464 | } |
|
465 | ||
466 | foreach ($datasources as $name => $about) { |
|
467 | $options[] = array( |
|
468 | $name, in_array($name, $fields['data_sources']), $about['name'] |
|
469 | ); |
|
470 | } |
|
471 | } |
|
472 | ||
473 | $label->appendChild(Widget::Select('fields[data_sources][]', $options, array('multiple' => 'multiple'))); |
|
474 | $group->appendChild($label); |