function _pdf_using_mpdf_attributes_access in PDF using mPDF 7.2
Check for generate PDF permission.
Parameters
string $node: Node array for currnet node.
Return value
bool TRUE if permision allow and FALSE if access denied.
1 string reference to '_pdf_using_mpdf_attributes_access'
- pdf_using_mpdf_menu in ./
pdf_using_mpdf.module - Implements hook_menu().
File
- ./
pdf_using_mpdf.module, line 77 - Prints PDF for a given html node view.
Code
function _pdf_using_mpdf_attributes_access($node) {
if (user_access('generate pdf using mpdf')) {
if (variable_get('pdf_using_mpdf_type_' . $node->type) == 1) {
return TRUE;
}
else {
return FALSE;
}
}
return FALSE;
// TRUE or you can user user_access() permissions as well
}