You are here

function _clients_feeds_feeds_importer_default in Web Service Clients 6

Same name and namespace in other branches
  1. 7 clients/clients_feeds/clients_feeds.defaults.inc \_clients_feeds_feeds_importer_default()

Helper to implementation of hook_feeds_importer_default().

1 string reference to '_clients_feeds_feeds_importer_default'
clients_feeds_feeds_importer_default in clients/clients_feeds/clients_feeds.features.inc
Implementation of hook_feeds_importer_default().

File

clients/clients_feeds/clients_feeds.defaults.inc, line 27
Actual function bodies for default hook definitions in feeds_defaults.features.inc.

Code

function _clients_feeds_feeds_importer_default() {
  $export = array();
  if (module_exists('clients_feeds')) {
    $feeds_importer = new stdClass();
    $feeds_importer->disabled = TRUE;

    /* Edit this to true to make a default feeds_importer disabled initially */
    $feeds_importer->api_version = 1;
    $feeds_importer->id = 'clients_feeds';

    // ??
    $feeds_importer->config = array(
      'name' => 'Clients feed',
      'description' => 'Create nodes from clients resources.',
      'fetcher' => array(
        'plugin_key' => 'FeedsClientsFetcher',
        'config' => array(),
      ),
      'parser' => array(
        'plugin_key' => 'FeedsClientsParser',
        'config' => array(
          'delimiter' => ',',
        ),
      ),
      'processor' => array(
        'plugin_key' => 'FeedsNodeProcessor',
        'config' => array(
          'content_type' => 'story',
          'update_existing' => 1,
          'expire' => '-1',
          'mappings' => array(
            '0' => array(
              'source' => 'title',
              'target' => 'title',
              'unique' => FALSE,
            ),
          ),
        ),
      ),
      'content_type' => '',
      'update' => 0,
      'import_period' => '-1',
      'expire_period' => 3600,
      'import_on_create' => 1,
    );
    $export['clients_feeds'] = $feeds_importer;
  }
  return $export;
}