function quiz_views_default_views in Quiz 8.6
Same name and namespace in other branches
- 8.4 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 8.5 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 5.2 quiz_views.module \quiz_views_default_views()
- 6.6 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 6.3 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 6.4 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 6.5 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 7.6 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 7 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 7.4 includes/views/quiz.views_default.inc \quiz_views_default_views()
- 7.5 includes/views/quiz.views_default.inc \quiz_views_default_views()
Implements hook_views_default_views().
File
- includes/
views/ quiz.views_default.inc, line 12 - Handles default views. Reads views from all the .view.inc files in the views/defaults directory.
Code
function quiz_views_default_views() {
$views = array();
$path = drupal_get_path('module', 'quiz') . '/includes/views/defaults';
$view_files = file_scan_directory($path, '/.*\\.view\\.inc/');
foreach ($view_files as $file) {
include DRUPAL_ROOT . '/' . $path . '/' . $file->filename;
$views[$view->name] = $view;
}
return $views;
}