public function FeedTypeTamperMeta::addTamper in Feeds Tamper 8.2
Adds a tamper plugin instance for this feed type.
Parameters
array $configuration: An array of tamper configuration.
Return value
string The tamper plugin instance ID.
Overrides FeedTypeTamperMetaInterface::addTamper
File
- src/
FeedTypeTamperMeta.php, line 121
Class
- FeedTypeTamperMeta
- Class for managing tamper plugins for a feed type.
Namespace
Drupal\feeds_tamperCode
public function addTamper(array $configuration) {
$configuration['uuid'] = $this->uuidGenerator
->generate();
$configuration['source_definition'] = $this
->getSourceDefinition();
$this
->getTampers()
->addInstanceId($configuration['uuid'], $configuration);
$this
->updateFeedType();
return $configuration['uuid'];
}