1 views.module views_get_module_apis($reset = FALSE)

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

File

core/modules/views/views.module, line 1019
Primarily Backdrop hooks and global API functions to manipulate views.

Code

function views_get_module_apis($reset = FALSE) {
  $api_cache = &backdrop_static(__FUNCTION__, array());
  if ($reset) {
    $api_cache = array();
  }

  if (empty($api_cache)) {
    $current_version = views_api_version();
    $minimum_version = views_api_minimum_version();
    foreach (module_implements('views_api') as $module) {
      $api_info = module_invoke($module, 'views_api');
      if (version_compare($api_info['api'], $minimum_version, '>=') && version_compare($api_info['api'], $current_version, '<=')) {
        $api_info['module'] = $module;
        $api_cache[$module] = $api_info;
      }
    }
  }

  return $api_cache;
}