You are here

public function FillPdfLinkManipulatorInterface::parseLink in FillPDF 5.0.x

Same name and namespace in other branches
  1. 8.4 src/FillPdfLinkManipulatorInterface.php \Drupal\fillpdf\FillPdfLinkManipulatorInterface::parseLink()

Parses a Url object.

Parameters

\Drupal\Core\Url $link: The valid URL containing the FillPDF generation metadata. e.g. 'http://example.com/fillpdf?entity_ids[]=node:1&entity_ids[]=contact:7'.

Return value

array An associative array representing the request context and containing the following properties: fid: int ID of the FillPDF form. sample: true|null Flag indicating if a sample file is to be generated. TRUE if yes, otherwise NULL. entity_ids: string[] Array of entity_type:entity_id pairs to populate the fields with. Will otherwise contain an empty array. force_download: true|null Flag indicating if the populated file should always be downloaded. TRUE if yes, otherwise NULL. flatten: false|null Flag indicating if the populated file should be flattened. FALSE if not, otherwise NULL.

Throws

\InvalidArgumentException If $link contains no query string or doesn't specify a valid FillPdfForm.

1 method overrides FillPdfLinkManipulatorInterface::parseLink()
FillPdfLinkManipulator::parseLink in src/Service/FillPdfLinkManipulator.php
Parses a Url object.

File

src/FillPdfLinkManipulatorInterface.php, line 69

Class

FillPdfLinkManipulatorInterface
Defines an interface to allow parsing and building FillPDF Links.

Namespace

Drupal\fillpdf

Code

public function parseLink(Url $link);