You are here

function feeds_importer_load_all in Feeds 7.2

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 feeds.module \feeds_importer_load_all()

Loads all importers.

Parameters

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

Return value

array An array of all feed configurations available.

Related topics

15 calls to feeds_importer_load_all()
drush_feeds_delete in ./feeds.drush.inc
Deletes a set of Feeds importers.
drush_feeds_disable in ./feeds.drush.inc
Disables a set of Feeds importers.
drush_feeds_enable in ./feeds.drush.inc
Enables a set of Feeds importers.
drush_feeds_list_importers in ./feeds.drush.inc
Prints a list of all Feeds importers.
drush_feeds_revert in ./feeds.drush.inc
Reverts a set of feeds.

... See full list

File

./feeds.module, line 1052
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);
      }
    }
    uasort($feeds, 'feeds_importer_name_sort');
  }
  return $feeds;
}