function biblio_admin_view in Bibliography Module 7.2
hook_menu callback for biblio administration pages that display a View.
Parameters
string $view_name The machine name of the view to show:
string $view_display The display ID of the view to show:
Return value
type
1 string reference to 'biblio_admin_view'
- biblio_menu in ./
biblio.module - Implements hook_menu().
File
- ./
biblio.module, line 3654
Code
function biblio_admin_view($view_name, $view_display) {
if (!module_exists('views')) {
drupal_set_message('This page requires the Views module be enabled.', 'error');
return;
}
$view_obj = views_get_view($view_name);
// If the view exists
if ($view_obj) {
return views_page($view_name, $view_display);
}
else {
$message = "Could not locate the <i>" . $view_name . "</i> View using the display <i>" . $view_display . "</i>. Please ensure that the Views module is enabled, and that the <i>" . $view_name . "</i> View is enabled.";
drupal_set_message($message, 'error');
}
return '';
}