You are here

function feeds_importer_load_all in Feeds 7

Same name and namespace in other branches
  1. 8.2 feeds.module \feeds_importer_load_all()
  2. 6 feeds.module \feeds_importer_load_all()
  3. 7.2 feeds.module \feeds_importer_load_all()

Loads all importers.

Parameters

$load_disabled: Pass TRUE to load all importers, enabled or disabled, pass FALSE to only retrieve enabled importers.

Return value

An array of all feed configurations available.

Related topics

7 calls to feeds_importer_load_all()
FeedsFeedNodeProcessor::configForm in plugins/FeedsFeedNodeProcessor.inc
Override parent::configForm().
feeds_menu in ./feeds.module
Implements hook_menu().
feeds_page in ./feeds.pages.inc
Render a page of available importers.
feeds_permission in ./feeds.module
Implements feeds_permission().
feeds_ui_overview_form in feeds_ui/feeds_ui.admin.inc
Build overview of available configurations.

... See full list

File

./feeds.module, line 601
Feeds - basic API functions and hook implementations.

Code

function feeds_importer_load_all($load_disabled = FALSE) {
  $feeds = array();

  // This function can get called very early in install process through
  // menu_router_rebuild(). Do not try to include CTools if not available.
  if (function_exists('ctools_include')) {
    ctools_include('export');
    $configs = ctools_export_load_object('feeds_importer', 'all');
    foreach ($configs as $config) {
      if (!empty($config->id) && ($load_disabled || empty($config->disabled))) {
        $feeds[$config->id] = feeds_importer($config->id);
      }
    }
  }
  return $feeds;
}