Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fillpdf
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
fillpdf
Commits
2a46fff0
Commit
2a46fff0
authored
5 years ago
by
Liam Morland
Browse files
Options
Downloads
Patches
Plain Diff
Improve comments
parent
608fc349
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
fillpdf.deprecated.inc
+6
-2
6 additions, 2 deletions
fillpdf.deprecated.inc
fillpdf.module
+15
-0
15 additions, 0 deletions
fillpdf.module
with
21 additions
and
2 deletions
fillpdf.deprecated.inc
+
6
−
2
View file @
2a46fff0
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
*
*
* @throws Exception
* @throws Exception
*
*
* @deprecated in 7.x-1.10 and
will be
removed from all future branches. Use
* @deprecated in
fillpdf:
7.x-1.10 and
is
removed from all future branches. Use
* fillpdf_merge_execute_pdf_action().
* fillpdf_merge_execute_pdf_action().
* @see https://www.drupal.org/project/fillpdf/issues/2538428
* @see https://www.drupal.org/project/fillpdf/issues/2538428
*/
*/
...
@@ -99,7 +99,7 @@ function fillpdf_merge_handle_pdf($pdf_info, $pdf_data, $token_objects, $action
...
@@ -99,7 +99,7 @@ function fillpdf_merge_handle_pdf($pdf_info, $pdf_data, $token_objects, $action
*
*
* @throws \Exception
* @throws \Exception
*
*
* @deprecated in 7.x-1.10 and
will be
removed from all future branches. Use
* @deprecated in
fillpdf:
7.x-1.10 and
is
removed from all future branches. Use
* fillpdf_action_save_to_file().
* fillpdf_action_save_to_file().
* @see https://www.drupal.org/project/fillpdf/issues/2538428
* @see https://www.drupal.org/project/fillpdf/issues/2538428
*/
*/
...
@@ -158,6 +158,10 @@ function fillpdf_save_to_file($pdf_info, $pdf_data, $token_objects, $output_name
...
@@ -158,6 +158,10 @@ function fillpdf_save_to_file($pdf_info, $pdf_data, $token_objects, $output_name
/**
/**
* Stores the updated $field in the database.
* Stores the updated $field in the database.
*
* @deprecated in fillpdf:7.x-1.11 and is removed from all future branches. Use
* fillpdf_fields_create_update().
* @see https://www.drupal.org/project/fillpdf/issues/2332323
*/
*/
function
fillpdf_update_field
(
$pdf_form
,
$field
,
$old_key
)
{
function
fillpdf_update_field
(
$pdf_form
,
$field
,
$old_key
)
{
$field
=
(
array
)
$field
;
$field
=
(
array
)
$field
;
...
...
This diff is collapsed.
Click to expand it.
fillpdf.module
+
15
−
0
View file @
2a46fff0
...
@@ -792,6 +792,8 @@ function fillpdf_merge_pdf($fid, $nids = NULL, $webform_array = NULL, $sample =
...
@@ -792,6 +792,8 @@ function fillpdf_merge_pdf($fid, $nids = NULL, $webform_array = NULL, $sample =
}
}
/**
/**
* Load entities needed to fill PDFs.
*
* @param $fillpdf_info
* @param $fillpdf_info
* @param $nids
* @param $nids
* @param $webform_array
* @param $webform_array
...
@@ -801,6 +803,7 @@ function fillpdf_merge_pdf($fid, $nids = NULL, $webform_array = NULL, $sample =
...
@@ -801,6 +803,7 @@ function fillpdf_merge_pdf($fid, $nids = NULL, $webform_array = NULL, $sample =
* @param $entity_ids
* @param $entity_ids
*
*
* @return array
* @return array
* An array of entities.
*/
*/
function
fillpdf_load_entities
(
$fillpdf_info
,
$nids
,
$webform_array
,
$uc_order_ids
,
$uc_order_product_ids
,
$user
,
$entity_ids
)
{
function
fillpdf_load_entities
(
$fillpdf_info
,
$nids
,
$webform_array
,
$uc_order_ids
,
$uc_order_product_ids
,
$user
,
$entity_ids
)
{
$context
=
array
(
$context
=
array
(
...
@@ -927,6 +930,8 @@ function fillpdf_load_entities($fillpdf_info, $nids, $webform_array, $uc_order_i
...
@@ -927,6 +930,8 @@ function fillpdf_load_entities($fillpdf_info, $nids, $webform_array, $uc_order_i
}
}
/**
/**
* Process image tokens.
*
* @param $entity_type
* @param $entity_type
* @param $entity
* @param $entity
* @param $obj
* @param $obj
...
@@ -964,6 +969,8 @@ function _fillpdf_process_image_tokens($entity_type, $entity, $obj, &$fields, &$
...
@@ -964,6 +969,8 @@ function _fillpdf_process_image_tokens($entity_type, $entity, $obj, &$fields, &$
}
}
/**
/**
* Prepare image data.
*
* @param $image_path
* @param $image_path
* @param $obj
* @param $obj
* @param $fields
* @param $fields
...
@@ -991,6 +998,8 @@ function _fillpdf_prepare_image_data($image_path, $obj, &$fields, &$image_data,
...
@@ -991,6 +998,8 @@ function _fillpdf_prepare_image_data($image_path, $obj, &$fields, &$image_data,
}
}
/**
/**
* Replace tokens.
*
* @param $value
* @param $value
* @param $token_objects
* @param $token_objects
* @param $existing_token
* @param $existing_token
...
@@ -1009,6 +1018,8 @@ function _fillpdf_merge_pdf_token_replace($value, $token_objects, &$existing_tok
...
@@ -1009,6 +1018,8 @@ function _fillpdf_merge_pdf_token_replace($value, $token_objects, &$existing_tok
}
}
/**
/**
* Return a FillPDF options object.
*
* @param $force_download
* @param $force_download
* @param $flatten
* @param $flatten
* @param $fillpdf_info
* @param $fillpdf_info
...
@@ -1022,6 +1033,7 @@ function _fillpdf_merge_pdf_token_replace($value, $token_objects, &$existing_tok
...
@@ -1022,6 +1033,7 @@ function _fillpdf_merge_pdf_token_replace($value, $token_objects, &$existing_tok
* @param $entities
* @param $entities
*
*
* @return object
* @return object
* The FillPDF options object.
*/
*/
function
_fillpdf_build_options_object
(
$force_download
,
$flatten
,
$fillpdf_info
,
$data
,
$nodes
,
$webforms
,
$uc_orders
,
$uc_order_products
,
$token_objects
,
$sample
,
$entities
)
{
function
_fillpdf_build_options_object
(
$force_download
,
$flatten
,
$fillpdf_info
,
$data
,
$nodes
,
$webforms
,
$uc_orders
,
$uc_order_products
,
$token_objects
,
$sample
,
$entities
)
{
// @todo: Convert function parameters to use $options
// @todo: Convert function parameters to use $options
...
@@ -1122,6 +1134,8 @@ function fillpdf_merge_perform_pdf_action($fillpdf_object, $action = 'download',
...
@@ -1122,6 +1134,8 @@ function fillpdf_merge_perform_pdf_action($fillpdf_object, $action = 'download',
}
}
/**
/**
* Save a PDF to a file.
*
* @param object $fillpdf_object
* @param object $fillpdf_object
* @param string $output_name
* @param string $output_name
* @param bool $redirect
* @param bool $redirect
...
@@ -1352,6 +1366,7 @@ function fillpdf_build_filename($original, $token_objects) {
...
@@ -1352,6 +1366,7 @@ function fillpdf_build_filename($original, $token_objects) {
* $fillpdf directly. Possible values: url, stream.
* $fillpdf directly. Possible values: url, stream.
*
*
* @return bool|null|string
* @return bool|null|string
* The output of the fill method or FALSE on failure.
*/
*/
function
fillpdf_execute_merge
(
$method
,
array
$fields
,
$fillpdf
,
$mode
=
'url'
,
$flatten
=
TRUE
,
$image_data
=
array
())
{
function
fillpdf_execute_merge
(
$method
,
array
$fields
,
$fillpdf
,
$mode
=
'url'
,
$flatten
=
TRUE
,
$image_data
=
array
())
{
$data
=
NULL
;
$data
=
NULL
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment