You are here

public function EntityProcessorBase::getItemLabel in Feeds 8.3

Returns the label for items being created, updated, or deleted.

Return value

string The item label.

Overrides ProcessorInterface::getItemLabel

File

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

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function getItemLabel() {
  if (!$this->entityType
    ->getKey('bundle') || !$this->entityType
    ->getBundleEntityType()) {
    return $this
      ->entityTypeLabel();
  }
  $storage = $this->entityTypeManager
    ->getStorage($this->entityType
    ->getBundleEntityType());
  return $storage
    ->load($this->configuration['values'][$this->entityType
    ->getKey('bundle')])
    ->label();
}