You are here

public function ItemsImporter::delete in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/aggregator/src/ItemsImporter.php \Drupal\aggregator\ItemsImporter::delete()

Deletes all imported items from a feed.

Parameters

\Drupal\aggregator\FeedInterface $feed: The feed that associated items should be deleted from.

Overrides ItemsImporterInterface::delete

File

core/modules/aggregator/src/ItemsImporter.php, line 80
Contains \Drupal\aggregator\ItemsImporter.

Class

ItemsImporter
Defines an importer of aggregator items.

Namespace

Drupal\aggregator

Code

public function delete(FeedInterface $feed) {
  foreach ($this->processorManager
    ->getDefinitions() as $id => $definition) {
    $this->processorManager
      ->createInstance($id)
      ->delete($feed);
  }
}