You are here

function hook_feeds_config_defaults in Feeds 7.2

Add additional configuration keys to FeedsConfigurable.

This hooks allows you to add additional configuration keys to a FeedsConfigurable. This is useful if you also implement a form alter hook to provide extra options for existing Feeds plugins. By implementing one of the Feeds hooks that are invoked during importing, you can act upon such setting.

Parameters

FeedsConfigurable $configurable: The configurable item to add default configuration to.

Return value

array Return an array of default configuration.

Related topics

1 function implements hook_feeds_config_defaults()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

feeds_tests_feeds_config_defaults in tests/feeds_tests.feeds.inc
Implements hook_feeds_config_defaults().
1 invocation of hook_feeds_config_defaults()
FeedsConfigurable::configDefaults in includes/FeedsConfigurable.inc
Return default configuration.

File

./feeds.api.php, line 617
Documentation of Feeds hooks.

Code

function hook_feeds_config_defaults(FeedsConfigurable $configurable) {
  if ($configurable instanceof FeedsImporter) {
    return array(
      'my_module_extra_setting_1' => 0,
      'my_module_extra_setting_2' => NULL,
    );
  }
}