views_get_module_apis

6 views.module views_get_module_apis($reset = FALSE)
7 views.module views_get_module_apis($api = 'views', $reset = FALSE)

Get a list of modules that support the current views API.

2 calls to views_get_module_apis()

File

./views.module, line 756
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_get_module_apis($reset = FALSE) {
  static $cache = NULL;
  if (!isset($cache) || $reset) {
    $cache = array();
    foreach (module_implements('views_api') as $module) {
      $function = $module . '_views_api';
      $info = $function();
      if (version_compare($info['api'], views_api_minimum_version(), '>=') && 
          version_compare($info['api'], views_api_version(), '<=')) {
        if (!isset($info['path'])) {
          $info['path'] = drupal_get_path('module', $module);
        }
        $cache[$module] = $info;
      }
    }
  }

  return $cache;
}
Login or register to post comments