You are here

public function FeedsProcessor::bundleOptions in Feeds 8.2

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

Return value

array A keyed array of bundle => label.

1 call to FeedsProcessor::bundleOptions()
FeedsProcessor::configForm in lib/Drupal/feeds/Plugin/FeedsProcessor.php
Overrides parent::configForm().

File

lib/Drupal/feeds/Plugin/FeedsProcessor.php, line 63
Contains FeedsProcessor and related classes.

Class

FeedsProcessor
Abstract class, defines interface for processors.

Namespace

Drupal\feeds\Plugin

Code

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