public function FillPdfAccessHelper::canGeneratePdfFromLink in FillPDF 5.0.x
Same name and namespace in other branches
- 8.4 src/FillPdfAccessHelper.php \Drupal\fillpdf\FillPdfAccessHelper::canGeneratePdfFromLink()
Provides a way to check access from a link argument.
This function should build a FillPdfLinkManipulator-compatible $context and then pass control to self::canGeneratePdfFromLink().
Parameters
\Drupal\Core\Url $link: The FillPDF Link containing the entities whose access to check.
\Drupal\Core\Session\AccountInterface $account: The user whose access is being checked.
Return value
\Drupal\Core\Access\AccessResultInterface The access results.
Overrides FillPdfAccessHelperInterface::canGeneratePdfFromLink
See also
\Drupal\fillpdf\FillPdfAccessHelperInterface::canGeneratePdfFromContext()
File
- src/
FillPdfAccessHelper.php, line 54
Class
- FillPdfAccessHelper
- Class FillPdfAccessHelper.
Namespace
Drupal\fillpdfCode
public function canGeneratePdfFromLink(Url $link, AccountInterface $account) {
$context = $this->linkManipulator
->parseLink($link);
return $this
->canGeneratePdfFromContext($context, $account);
}