public function FeedsSource::delete in Feeds 7.2
Same name and namespace in other branches
- 6 includes/FeedsSource.inc \FeedsSource::delete()
- 7 includes/FeedsSource.inc \FeedsSource::delete()
Removes the feed source from the database.
File
- includes/
FeedsSource.inc, line 1009 - Definition of FeedsSourceInterface, FeedsState and FeedsSource class.
Class
- FeedsSource
- Holds the source of a feed to import.
Code
public function delete() {
// Alert implementers of FeedsSourceInterface to the fact that we're
// deleting.
foreach ($this->importer->plugin_types as $type) {
$this->importer->{$type}
->sourceDelete($this);
}
db_delete('feeds_source')
->condition('id', $this->id)
->condition('feed_nid', $this->feed_nid)
->execute();
// Remove from schedule.
$job = array(
'type' => $this->id,
'id' => $this->feed_nid,
);
JobScheduler::get('feeds_source_import')
->remove($job);
JobScheduler::get('feeds_source_expire')
->remove($job);
}