You are here

function statspro_views_default_views in Statistics Pro 6.2

Same name and namespace in other branches
  1. 6 views/statspro.views_default.inc \statspro_views_default_views()

Declare all the .view files in the views subdir that end in .view.

File

views/statspro.views_default.inc, line 12
Default views for Statistics Pro module.

Code

function statspro_views_default_views() {
  $files = file_scan_directory(drupal_get_path('module', 'statspro') . '/views/defaults', '.view');
  foreach ($files as $absolute => $file) {
    require $absolute;
    $views[$view->name] = $view;
  }
  return $views;
}