You are here

public function EntityProcessorBase::getItemLabelPlural in Feeds 8.3

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

Return value

string The plural item label.

Overrides ProcessorInterface::getItemLabelPlural

1 call to EntityProcessorBase::getItemLabelPlural()
EntityProcessorBase::entitySaveAccess in src/Feeds/Processor/EntityProcessorBase.php

File

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

Class

EntityProcessorBase
Defines a base entity processor.

Namespace

Drupal\feeds\Feeds\Processor

Code

public function getItemLabelPlural() {
  if (!$this->entityType
    ->getKey('bundle') || !$this->entityType
    ->getBundleEntityType()) {
    return $this
      ->entityTypeLabelPlural();
  }

  // Entity bundles do not support plural labels yet.
  // @todo Fix after https://www.drupal.org/project/drupal/issues/2765065.
  $storage = $this->entityTypeManager
    ->getStorage($this->entityType
    ->getBundleEntityType());
  $label = $storage
    ->load($this->configuration['values'][$this->entityType
    ->getKey('bundle')])
    ->label();
  return $this
    ->t('@label items', [
    '@label' => $label,
  ]);
}