You are here

function CertificateController::accessPdf in Certificate 4.x

Downloads

Parameters

$entity:

AccountInterface $account:

CertificateTemplate $template:

Return value

type

File

src/Controller/CertificateController.php, line 174

Class

CertificateController

Namespace

Drupal\certificate\Controller

Code

function accessPdf(EntityInterface $entity = NULL, AccountInterface $user, CertificateTemplate $certificate_template) {
  if (!($entity = $this
    ->getEntityFromRoute())) {
    return AccessResult::neutral();
  }
  return $this
    ->accessTab($entity, $user);
}