You are here

public function TestProcessor::delete in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/processor/TestProcessor.php \Drupal\aggregator_test\Plugin\aggregator\processor\TestProcessor::delete()

Deletes stored feed data.

Called by aggregator if either a feed is deleted or a user clicks on "delete items".

Parameters

\Drupal\aggregator\FeedInterface $feed: The $feed object whose items are being deleted.

Overrides ProcessorInterface::delete

File

core/modules/aggregator/tests/modules/aggregator_test/src/Plugin/aggregator/processor/TestProcessor.php, line 116

Class

TestProcessor
Defines a default processor implementation.

Namespace

Drupal\aggregator_test\Plugin\aggregator\processor

Code

public function delete(FeedInterface $feed) {

  // Append a random number, just to change the feed description.
  $feed->description->value .= rand(0, 10);
}