You are here

function _feeds_ui_format_options in Feeds 6

Same name and namespace in other branches
  1. 8.2 feeds_ui/feeds_ui.admin.inc \_feeds_ui_format_options()
  2. 7.2 feeds_ui/feeds_ui.admin.inc \_feeds_ui_format_options()
  3. 7 feeds_ui/feeds_ui.admin.inc \_feeds_ui_format_options()

Walk the result of FeedsParser::getMappingSources() or FeedsProcessor::getMappingTargets() and format them into a Form API options array.

1 call to _feeds_ui_format_options()
feeds_ui_mapping_form in feeds_ui/feeds_ui.admin.inc
Edit mapping.

File

feeds_ui/feeds_ui.admin.inc, line 632
Contains all page callbacks, forms and theming functions for Feeds administrative pages.

Code

function _feeds_ui_format_options($options) {
  $result = array();
  foreach ($options as $k => $v) {
    if (is_array($v) && !empty($v['name'])) {
      $result[$k] = $v['name'];
    }
    elseif (is_array($v)) {
      $result[$k] = $k;
    }
    else {
      $result[$k] = $v;
    }
  }
  asort($result);
  return $result;
}