function biblio_ui_export_view_access in Bibliography Module 7.3
Menu access; Allow export based on existing Biblio style and user access.
Parameters
$view_name: Biblio related View name.
$display_name: Biblio related View display name.
$style_name: Biblio style string.
$format_name: (Optional) Biblio export format string.
Return value
bool TRUE if user has access to export by View.
1 string reference to 'biblio_ui_export_view_access'
- biblio_ui_menu in modules/
biblio_ui/ biblio_ui.module - Implements hook_menu().
File
- modules/
biblio_ui/ biblio_ui.module, line 1109 - Main functionality file for the biblio UI module.
Code
function biblio_ui_export_view_access($view_name, $display_name, $style_name, $format_name = NULL) {
if (!user_access('view biblio')) {
// User can't view Biblios.
return;
}
if (!biblio_get_exportable_biblio_style($style_name, $format_name)) {
// Style name doesn't exist.
return;
}
if (!biblio_ui_is_biblio_view($view_name, $display_name)) {
// The given view/display does not fit for Biblio.
return;
}
return TRUE;
}