You are here

function _filebrowser_externals in Filebrowser 8

Same name and namespace in other branches
  1. 6.2 includes/helpers.inc \_filebrowser_externals()
  2. 7.4 filebrowser.common.inc \_filebrowser_externals()
  3. 7.2 filebrowser.common.inc \_filebrowser_externals()
  4. 7.3 filebrowser.common.inc \_filebrowser_externals()

This function is used to invoke filebrowser_$kind hooks. Difference with a direct module_invoke_all is that result is cached in a static way (for now, real caching perhaps later).

Parameters

$kind name of the hook (complete hook will be filebrowser_$kind):

$name the name of the resource retreived by the hook (used as hook: parameter and cache index)

8 calls to _filebrowser_externals()
filebrowser_form_metadata in ./filebrowser.pages.inc
filebrowser_view_D7_BAK in ./filebrowser.module
Implements hook_init().
options_default_sort in ./filebrowser.module
options_default_view in ./filebrowser.module
options_field_visible_columns in ./filebrowser.module

... See full list

File

./filebrowser.common.inc, line 162
Misc filebrowser common functions.

Code

function _filebrowser_externals($kind, $name = NULL) {
  static $externals = array();
  if (!isset($externals[$kind])) {
    $externals[$kind] = module_invoke_all("filebrowser_{$kind}");
  }
  if (!is_null($name)) {
    return isset($externals[$kind][$name]) ? $externals[$kind][$name] : NULL;
  }
  return $externals[$kind];
}