You are here

public function FeedsDataProcessor::clear in Feeds 6

Implementation of FeedsProcessor::clear().

Delete all data records for feed_nid in this table.

Overrides FeedsProcessor::clear

File

plugins/FeedsDataProcessor.inc, line 69
Definition of FeedsDataProcessor.

Class

FeedsDataProcessor
Creates simple table records from feed items. Uses Data module.

Code

public function clear(FeedsBatch $batch, FeedsSource $source) {
  $clause = array(
    'feed_nid' => $source->feed_nid,
  );
  $num = $this
    ->handler()
    ->delete($clause);
  if ($num) {
    drupal_set_message('All items have been deleted.');
  }
  else {
    drupal_set_message('There were no items to delete.');
  }
}