function fillpdf_rules_action_merge_webform in FillPDF 7.2
Same name and namespace in other branches
- 7 fillpdf.rules.inc \fillpdf_rules_action_merge_webform()
Populates a loaded FillPDF configuration's PDF with data.
1 string reference to 'fillpdf_rules_action_merge_webform'
- fillpdf_rules_action_info in ./
fillpdf.rules.inc - Implements hook_rules_action_info(). @todo: Define the following actions:
File
- ./
fillpdf.rules.inc, line 176 - fillpdf.rules.inc
Code
function fillpdf_rules_action_merge_webform($fillpdf, $webform_nid = '', $webform_sids = array()) {
$skip_access_check = FALSE;
$flatten = TRUE;
$webforms = array();
foreach ($webform_sids as $sid) {
$webforms[] = array(
'nid' => $webform_nid,
'sid' => $sid,
);
}
if (empty($webforms) && empty($webform_nid) !== TRUE) {
$webforms[0]['nid'] = $webform_nid;
}
// @todo: Parameterize $skip_access_check and $flatten in Rules.
$fillpdf = fillpdf_merge_pdf($fillpdf->info->fid, NULL, $webforms, NULL, FALSE, $skip_access_check, $flatten, FALSE);
return array(
'fillpdf' => $fillpdf,
);
}