You are here

public function FeedsProcessor::bundleOptions in Feeds 7.2

Provides a list of bundle options for use in select lists.

Return value

array A keyed array of bundle => label.

2 calls to FeedsProcessor::bundleOptions()
FeedsProcessor::configForm in plugins/FeedsProcessor.inc
Returns configuration form for this object.
FeedsProcessor::validateConfig in plugins/FeedsProcessor.inc
Validates the configuration.

File

plugins/FeedsProcessor.inc, line 73
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Code

public function bundleOptions() {
  $options = array();
  foreach (field_info_bundles($this
    ->entityType()) as $bundle => $info) {
    if (!empty($info['label'])) {
      $options[$bundle] = $info['label'];
    }
    else {
      $options[$bundle] = $bundle;
    }
  }
  return $options;
}