From 686fd3b461132097078f35b8bd5fc5889e1d9974 Mon Sep 17 00:00:00 2001
From: Liam Morland <lkmorlan@uwaterloo.ca>
Date: Tue, 12 Apr 2022 10:42:00 -0400
Subject: [PATCH] Issue #3274842: Create
 hook_fillpdf_populate_pdf_context_alter()

---
 src/Controller/HandlePdfController.php | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/Controller/HandlePdfController.php b/src/Controller/HandlePdfController.php
index cf592eb..59f7c75 100644
--- a/src/Controller/HandlePdfController.php
+++ b/src/Controller/HandlePdfController.php
@@ -176,6 +176,11 @@ class HandlePdfController extends ControllerBase {
    */
   public function populatePdf() {
     $context = $this->linkManipulator->parseRequest($this->requestStack->getCurrentRequest());
+
+    // Create hook_fillpdf_populate_pdf_context_alter().
+    // Allow modules to alter $context.
+    $this->moduleHandler()->alter('fillpdf_populate_pdf_context', $context);
+
     $fillpdf_form = FillPdfForm::load($context['fid']);
     $entities = $this->contextManager->loadEntities($context);
 
-- 
GitLab