You are here

function devel_function_reference in Devel 5

Same name and namespace in other branches
  1. 6 devel.module \devel_function_reference()
  2. 7 devel.pages.inc \devel_function_reference()

Returns a list of all currently defined user functions in the current request lifecycle, with links their documentation.

1 string reference to 'devel_function_reference'
devel_menu in ./devel.module
Implementation of hook_menu().

File

./devel.module, line 649

Code

function devel_function_reference() {
  $functions = get_defined_functions();
  $ufunctions = $functions['user'];
  sort($ufunctions);
  foreach ($ufunctions as $function) {
    if (class_exists('ReflectionFunction')) {
      $func = new ReflectionFunction($function);
      $isNotCore = stristr($func
        ->getFileName(), realpath($_SERVER['DOCUMENT_ROOT'] . '/sites')) ? true : false;
    }
    if (!$isNotCore) {
      $links[] = l($function, "http://api.drupal.org/api/function/{$function}/" . DEVEL_CURRENT_DRUPAL_VERSION);
    }
  }
  return theme('item_list', $links);
}