function DefaultProcessor::delete
Same name in other branches
- 9 core/modules/aggregator/src/Plugin/aggregator/processor/DefaultProcessor.php \Drupal\aggregator\Plugin\aggregator\processor\DefaultProcessor::delete()
Overrides ProcessorInterface::delete
File
-
core/
modules/ aggregator/ src/ Plugin/ aggregator/ processor/ DefaultProcessor.php, line 242
Class
- DefaultProcessor
- Defines a default processor implementation.
Namespace
Drupal\aggregator\Plugin\aggregator\processorCode
public function delete(FeedInterface $feed) {
if ($items = $this->itemStorage
->loadByFeed($feed->id())) {
$this->itemStorage
->delete($items);
}
// @todo This should be moved out to caller with a different message maybe.
$this->messenger
->addStatus(t('The news items from %site have been deleted.', [
'%site' => $feed->label(),
]));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.