You are here

public function FeedTypeTamperMeta::getTampersGroupedBySource in Feeds Tamper 8.2

Returns the tamper plugin instances for this feed type, keyed by source.

Return value

\Drupal\tamper\TamperInterface[][] An associative array of plugin instances, keyed by source.

Overrides FeedTypeTamperMetaInterface::getTampersGroupedBySource

1 call to FeedTypeTamperMeta::getTampersGroupedBySource()
FeedTypeTamperMeta::rectifyInstances in src/FeedTypeTamperMeta.php
Removes tamper instances whose source was removed from the mapping.

File

src/FeedTypeTamperMeta.php, line 102

Class

FeedTypeTamperMeta
Class for managing tamper plugins for a feed type.

Namespace

Drupal\feeds_tamper

Code

public function getTampersGroupedBySource() {
  $grouped_tampers = [];
  $this
    ->getTampers()
    ->sort();
  foreach ($this
    ->getTampers() as $id => $tamper) {
    $grouped_tampers[(string) $tamper
      ->getSetting('source')][$id] = $tamper;
  }
  return $grouped_tampers;
}