You are here

function views_get_module_apis in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 views.module \views_get_module_apis()
  2. 7.3 views.module \views_get_module_apis()

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

1 call to views_get_module_apis()
views_module_include in ./views.module
Load views files on behalf of modules.

File

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

Code

function views_get_module_apis() {
  static $cache = NULL;
  if (!isset($cache)) {
    $cache = array();
    foreach (module_implements('views_api') as $module) {
      $function = $module . '_views_api';
      $info = $function();
      if (isset($info['api']) && $info['api'] == 2.0) {
        if (!isset($info['path'])) {
          $info['path'] = drupal_get_path('module', $module);
        }
        $cache[$module] = $info;
      }
    }
  }
  return $cache;
}