You are here

public function FeedTypeTamperMeta::getTampers in Feeds Tamper 8.2

Returns the tamper plugin instances for this feed type.

Return value

\Drupal\feeds_tamper\TamperPluginCollection|\Drupal\tamper\TamperInterface[] The tamper plugin collection.

Overrides FeedTypeTamperMetaInterface::getTampers

2 calls to FeedTypeTamperMeta::getTampers()
FeedTypeTamperMeta::getPluginCollections in src/FeedTypeTamperMeta.php
Gets the plugin collections used by this object.
FeedTypeTamperMeta::getTampersGroupedBySource in src/FeedTypeTamperMeta.php
Returns the tamper plugin instances for this feed type, keyed by source.

File

src/FeedTypeTamperMeta.php, line 89

Class

FeedTypeTamperMeta
Class for managing tamper plugins for a feed type.

Namespace

Drupal\feeds_tamper

Code

public function getTampers() {
  if (!isset($this->tamperCollection)) {
    $tampers = $this->feedType
      ->getThirdPartySetting('feeds_tamper', 'tampers');
    $tampers = empty($tampers) ? [] : $tampers;
    $this->tamperCollection = new TamperPluginCollection($this->tamperManager, $this
      ->getSourceDefinition(), $tampers);
    $this->tamperCollection
      ->sort();
  }
  return $this->tamperCollection;
}