You are here

function feeds_tamper_load_all_instances in Feeds Tamper 7

Same name and namespace in other branches
  1. 6 feeds_tamper.inc \feeds_tamper_load_all_instances()

Load all plugin instances.

Parameters

bool $disabled: (optional) If TRUE, load disabled plugin instances. Defaults to FALSE.

bool $reset: (optional) If TRUE, the static cache of all objects will be flushed prior to loading. Defaults to FALSE.

Return value

array An associative array of plugin instances keyed to their id.

Related topics

1 call to feeds_tamper_load_all_instances()
FeedsTamperUIWebTestCase::testBasic in feeds_tamper_ui/tests/feeds_tamper_ui.test

File

./feeds_tamper.inc, line 38
Version agnostic parts of feeds_tamper.module.

Code

function feeds_tamper_load_all_instances($disabled = FALSE, $reset = FALSE) {
  $instances = array();
  ctools_include('export');
  $configs = ctools_export_crud_load_all('feeds_tamper', $reset);
  foreach ($configs as $instance_id => $config) {
    if (!empty($config->id) && ($disabled || empty($config->disabled))) {
      $instances[$instance_id] = $config;
    }
  }
  return $instances;
}