You are here

function _views_fetch_data_build in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 8.3 includes/cache.inc \_views_fetch_data_build()

Build and set the views data cache if empty.

1 call to _views_fetch_data_build()
_views_fetch_data in includes/cache.inc
Fetch Views' data from the cache.

File

includes/cache.inc, line 90
Load Views' data so that it knows what is available to build queries from.

Code

function _views_fetch_data_build() {
  views_include_handlers();
  $cache = module_invoke_all('views_data');
  foreach (module_implements('views_data_alter') as $module) {
    $function = $module . '_views_data_alter';
    $function($cache);
  }
  _views_data_process_entity_types($cache);

  // Keep a record with all data.
  views_cache_set('views_data', $cache, TRUE);
  return $cache;
}