You are here

function views_handler_dependencies in Features 6

Provides an array that maps hook_views_data() tables to modules.

1 call to views_handler_dependencies()
views_features_export in includes/features.views.inc
Implementation of hook_features_export().

File

includes/features.views.inc, line 205

Code

function views_handler_dependencies() {
  views_include_handlers();
  static $map;
  if (!isset($map)) {
    $map = array();
    foreach (module_implements('views_data') as $module) {
      if ($tables = module_invoke($module, 'views_data')) {
        foreach ($tables as $table => $info) {
          if (isset($info['table']) && (!isset($map[$table]) || !empty($info['table']['group']))) {
            $map[$table] = $module;
          }
          else {
            if (!isset($map[$table])) {
              $map[$table] = $module;
            }
          }
        }
      }
    }
  }
  return $map;
}