function biblio_ui_is_biblio_view in Bibliography Module 7.3
Verify the given View and display names exist and related to Biblio.
Parameters
$view_name: View name.
$display_name: View display name.
Return value
TRUE if Biblio view and display exist and accessible. FALSE otherwise.
1 call to biblio_ui_is_biblio_view()
- biblio_ui_export_view_access in modules/
biblio_ui/ biblio_ui.module - Menu access; Allow export based on existing Biblio style and user access.
File
- modules/
biblio_ui/ biblio_ui.module, line 1263 - Main functionality file for the biblio UI module.
Code
function biblio_ui_is_biblio_view($view_name, $display_name) {
if (!($view = views_get_view($view_name))) {
// View does not exist.
return;
}
if ($view->base_table != 'biblio') {
// View does not provide Biblio entities.
return;
}
if (!$view
->access($display_name)) {
// No access to the given display.
return;
}
return TRUE;
}