You are here

function _filebrowser_externals in Filebrowser 6.2

Same name and namespace in other branches
  1. 8 filebrowser.common.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)

6 calls to _filebrowser_externals()
filebrowser_form_metadata in ./filebrowser.pages.inc
filebrowser_view in ./filebrowser.module
Implementation of hook_init().
theme_dir_listing_list_view in ./filebrowser.theme.inc
Theming function for list view.
_filebrowser_form_presentation_part in includes/node.inc
_filebrowser_form_rights_part in includes/node.inc

... See full list

File

includes/helpers.inc, line 116
Misc helper 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];
}