Several classes use the $context array returned by \Drupal\fillpdf\FillPdfLinkManipulatorInterface::parseLink().

This should be replaced with a FillPdfLinkContext object; it would then be possible to add validation to the data structure, create properties for the properties that should exist in the array, simplify code that uses it, and so on.

FillPdfManipulatorInterface::parseLink() would then return an instance of this.

Comments

wizonesolutions created an issue. See original summary.

Pancho’s picture

Title: Create ValueObject-pattern class to replace $context array » [PP-1] Create ValueObject-pattern class to replace $context array
Related issues: +#3048947: Refactor HandlePdfController::populatePdf()

Postponing on #3048947: Refactor HandlePdfController::populatePdf() but definitely the way to go.

Pancho’s picture

Title: [PP-1] Create ValueObject-pattern class to replace $context array » Create ValueObject-pattern class to replace $context array
Priority: Major » Normal

No longer postponed.