function _views_fetch_data_build

Build, set the views data cache if empty and return the views data.

Return value

array The views_data of all tables.

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

File

drupal/core/modules/views/includes/cache.inc, line 73
Load Views' data so that it knows what is available to build queries from.

Code

function _views_fetch_data_build() {
  $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);

  // Save data in seperate cache entries.
  foreach ($cache as $key => $data) {
    $cid = 'views_data:' . $key;
    views_cache_set($cid, $data, TRUE);
  }
  return $cache;
}