You are here

public function EntityProcessorBase::bundle in Feeds 8.3

Bundle type this processor operates on.

Defaults to the entity type for entities that do not define bundles.

@todo We should be more careful about missing bundles.

Return value

string|null The bundle type this processor operates on, or null if it is undefined.

4 calls to EntityProcessorBase::bundle()
EntityProcessorBase::buildAdvancedForm in src/Feeds/Processor/EntityProcessorBase.php
EntityProcessorBase::calculateDependencies in src/Feeds/Processor/EntityProcessorBase.php
Calculates dependencies for the configured plugin.
EntityProcessorBase::prepareFeedsItemField in src/Feeds/Processor/EntityProcessorBase.php
Prepares the feeds_item field.
EntityProcessorBase::removeFeedItemField in src/Feeds/Processor/EntityProcessorBase.php
Deletes the feeds_item field.

File

src/Feeds/Processor/EntityProcessorBase.php, line 353

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function bundle() {
  if (!($bundle_key = $this->entityType
    ->getKey('bundle'))) {
    return $this
      ->entityType();
  }
  if (isset($this->configuration['values'][$bundle_key])) {
    return $this->configuration['values'][$bundle_key];
  }
}