Skip to content
Snippets Groups Projects
Commit fb1b69be authored by Christian Johansson's avatar Christian Johansson Committed by Kevin Kaland
Browse files

Issue #1336458: Provide alter hook before generation.

parent d03d7ace
No related branches found
No related tags found
No related merge requests found
...@@ -337,6 +337,14 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu ...@@ -337,6 +337,14 @@ function fillpdf_merge_pdf($fid, $nids = null, $webform_arr = null, $sample = nu
} }
} }
// Provide hook_fillpdf_merge_fields_alter() to let other modules
// alter fields before pdf generation.
$context = array(
'nodes' => $nodes,
'webforms' => $webforms,
);
drupal_alter('fillpdf_merge_fields_alter', $fields, $context);
$output_name = preg_replace('/[^a-zA-Z0-9_]/', '', $fillpdf_info->title) .'.pdf'; $output_name = preg_replace('/[^a-zA-Z0-9_]/', '', $fillpdf_info->title) .'.pdf';
$pdf_data = _fillpdf_get_file_contents($fillpdf_info->url, "<front>"); $pdf_data = _fillpdf_get_file_contents($fillpdf_info->url, "<front>");
$fillpdf_remote_service = variable_get('fillpdf_remote_service', TRUE); $fillpdf_remote_service = variable_get('fillpdf_remote_service', TRUE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment