function _fillpdf_process_destination_path in FillPDF 7.2
Same name and namespace in other branches
- 6 fillpdf.module \_fillpdf_process_destination_path()
- 7 fillpdf.module \_fillpdf_process_destination_path()
1 call to _fillpdf_process_destination_path()
- fillpdf_save_to_file in ./fillpdf.module
File
- ./fillpdf.module, line 1014
- Allows mappings of PDFs to site content
Code
function _fillpdf_process_destination_path($destination_path, $token_objects) {
$orig_path = $destination_path;
$destination_path = trim($orig_path);
$types = array();
if (isset($token_objects['node'])) {
$types[] = 'node';
}
elseif (isset($token_objects['webform'])) {
$types[] = 'webform';
}
foreach ($types as $type) {
$destination_path = token_replace($destination_path, array(
$type => $token_objects[$type],
), array(
'clear' => TRUE,
));
}
if (drupal_substr($destination_path, 0, 1) === '/') {
}
else {
$destination_path = file_build_uri($destination_path);
}
return $destination_path;
}