You are here

function emfield_system_list in Embedded Media Field 5

Same name and namespace in other branches
  1. 6.3 deprecated/emfield-deprecated.inc \emfield_system_list()
  2. 6 emfield.module \emfield_system_list()
  3. 6.2 emfield.module \emfield_system_list()

Return an array of installed .inc files and/or loads them upon request. This routine is modeled after drupal_system_listing() (and also depends on it). It's major difference, however, is that it loads .inc files by default.

Parameters

$provider: Optional; name of the passed $provider to find (e.g. "youtube", "google", etc.).

$load: Defaults to TRUE; whether to include matching files into memory.

Return value

An array of file objects optionally matching $provider.

9 calls to emfield_system_list()
emfield_allowed_providers in ./emfield.module
return a list of providers allowed for a specific field
emfield_emfield_widget_settings in ./emfield.module
Widgets *
emfield_include_invoke in ./emfield.module
Invoke hook in a particular include.
emfield_settings in ./emfield.module
Callback for admin/content/emfield
emfield_views_handler_filter_provider_list in ./emfield.module
Create a list of providers.

... See full list

File

./emfield.module, line 887

Code

function emfield_system_list($module, $provider = NULL, $load = TRUE) {
  $override_files = module_invoke_all('emfield_providers', $module, $provider);
  $files = drupal_system_listing("{$provider}\\.inc", drupal_get_path('module', $module) . "/providers", 'name', 0);
  $files = array_merge($files, $override_files);
  ksort($files);
  if ($load) {
    foreach ($files as $file) {
      emfield_include_list($file);
    }
  }
  return $files;
}