You are here

function _filebrowser_externals in Filebrowser 7.3

Same name and namespace in other branches
  1. 8 filebrowser.common.inc \_filebrowser_externals()
  2. 6.2 includes/helpers.inc \_filebrowser_externals()
  3. 7.4 filebrowser.common.inc \_filebrowser_externals()
  4. 7.2 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)

5 calls to _filebrowser_externals()
filebrowser_form in ./filebrowser.module
Implements hook_form(). @Inheritdoc
filebrowser_form_metadata in ./filebrowser.pages.inc
filebrowser_view in ./filebrowser.module
Implements hook_init().
theme_dir_listing_list_view in ./filebrowser.theme.inc
Theming function for list view.
_filebrowser_prepare_record in ./filebrowser.common.inc
Prepare node record to be used. This is mainly about default stuff.

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];
}