The document discusses Drupal Feeds and its key components. It describes FeedsSource which extends FeedsConfigurable and how it imports data. It outlines the Feeds plugins system including Fetcher, Parser and Processor plugins. It details how Feeds imports data using a background job or batch process and calls the import method on FeedsSource. Finally it discusses Feeds hooks and creating custom Fetcher plugins.
9. Feeds plugins forms
● configForm
// forms displayed at feeds instance settings tab (admin level)
FE: OpenERP_Fetcher::configForm($fs) – select model,
setting for limiting count of fetched data etc.
Exportable as config array !!! (via import export clone)
// configFormSubmit,configFormValidate
● sourceForm
// forms displayed at /import/$feeds_instance page and at
content type creation forms (user level)
FE: FeedsFileFetcher::sourceForm($sc) – upload file form,
form for listing already uploaded files etc.
// sourceFormValidate, sourceFormSubmit
08.09.2011 Kyiv Drupal Cafe`
10. Feeds tricks
function ofeeds_ctools_plugin_api($owner, $api) {
if ($owner == 'feeds' && $api == 'plugins') {
return array('version' => 1);
}
}
function ofeeds_enable() {
//clear the cache to display in Feeds as available plugin.
cache_clear_all('plugins:feeds:plugins', 'cache');
}
// Do not use variable_set as instances config !!!