function feeds_source_clear in Feeds 7.2
Same name and namespace in other branches
- 8.2 feeds.module \feeds_source_clear()
Scheduler callback for deleting all items from a source.
Parameters
array $job: A job definition, which consists of at least the following elements:
- type (string) The importer ID.
- id (int) The Feed node ID if the importer is attached to a content type. Otherwise 0.
Related topics
3 string references to 'feeds_source_clear'
- FeedsSource::scheduleClear in includes/
FeedsSource.inc - Schedule background clearing tasks.
- feeds_cron_job_scheduler_info in ./
feeds.module - Implements hook_cron_job_scheduler_info().
- feeds_cron_queue_info in ./
feeds.module - Implements hook_cron_queue_info().
File
- ./
feeds.module, line 168 - Feeds - basic API functions and hook implementations.
Code
function feeds_source_clear(array $job) {
$source = _feeds_queue_worker_helper($job, 'clear');
if ($source
->doesExist()) {
$source
->scheduleClear();
}
}