You are here

public function FeedTypeTamperManager::getTamperMeta in Feeds Tamper 8.2

Gets Tamper functionality for a feed type.

Parameters

\Drupal\feeds\FeedTypeInterface $feed_type: The feed type to manage tamper plugins for.

bool $reset: Whether to force creating a new instance (useful in automated tests). Defaults to false.

Return value

\Drupal\feeds_tamper\FeedTypeTamperMetaInterface A feed type tamper meta object.

Overrides FeedTypeTamperManagerInterface::getTamperMeta

File

src/FeedTypeTamperManager.php, line 25

Class

FeedTypeTamperManager
Manager for FeedTypeTamperMeta instances.

Namespace

Drupal\feeds_tamper

Code

public function getTamperMeta(FeedTypeInterface $feed_type, $reset = FALSE) {
  $id = $feed_type
    ->id();
  if ($reset || !isset($this->tamperMetas[$id])) {
    $this->tamperMetas[$id] = FeedTypeTamperMeta::create($this->container, $feed_type);
  }
  return $this->tamperMetas[$id];
}