public function GeneratePdf::checkAccess in PDF using mPDF 8
Checks if current user has access to view PDF.
Parameters
\Drupal\Core\Session\AccountInterface $account: Current user account.
Return value
\Drupal\Core\Access\AccessResult True if user has access, false otherwise.
1 string reference to 'GeneratePdf::checkAccess'
File
- src/
Controller/ GeneratePdf.php, line 96
Class
- GeneratePdf
- Class GeneratePdf.
Namespace
Drupal\pdf_using_mpdf\ControllerCode
public function checkAccess(AccountInterface $account) {
return AccessResult::allowedIf($account
->hasPermission('generate pdf using mpdf') && $this
->checkContentTypeEnabled());
}