| @@ 483-493 (lines=11) @@ | ||
| 480 | $events = ResourceManager::fetch(ResourceManager::RESOURCE_TYPE_EVENT, array(), array(), 'name ASC'); |
|
| 481 | $options = array(); |
|
| 482 | ||
| 483 | if (is_array($events) && !empty($events)) { |
|
| 484 | if (!isset($fields['events'])) { |
|
| 485 | $fields['events'] = array(); |
|
| 486 | } |
|
| 487 | ||
| 488 | foreach ($events as $name => $about) { |
|
| 489 | $options[] = array( |
|
| 490 | $name, |
|
| 491 | in_array($name, $fields['events']), |
|
| 492 | $about['name'] |
|
| 493 | ); |
|
| 494 | } |
|
| 495 | } |
|
| 496 | ||
| @@ 508-518 (lines=11) @@ | ||
| 505 | $datasources = ResourceManager::fetch(ResourceManager::RESOURCE_TYPE_DS, array(), array(), 'name ASC'); |
|
| 506 | $options = array(); |
|
| 507 | ||
| 508 | if (is_array($datasources) && !empty($datasources)) { |
|
| 509 | if (!isset($fields['data_sources'])) { |
|
| 510 | $fields['data_sources'] = array(); |
|
| 511 | } |
|
| 512 | ||
| 513 | foreach ($datasources as $name => $about) { |
|
| 514 | $options[] = array( |
|
| 515 | $name, |
|
| 516 | in_array($name, $fields['data_sources']), |
|
| 517 | $about['name'] |
|
| 518 | ); |
|
| 519 | } |
|
| 520 | } |
|
| 521 | ||