function _webform2pdf_list_template_vars in Webform2PDF 6
Same name and namespace in other branches
- 6.2 webform2pdf.module \_webform2pdf_list_template_vars()
2 calls to _webform2pdf_list_template_vars()
- webform2pdf_edit_form in ./
webform2pdf.module - Overview form of all components for this webform.
- _webform2pdf_get_template_vars in ./
webform2pdf.module
File
- ./
webform2pdf.module, line 1239
Code
function _webform2pdf_list_template_vars($node) {
$tokens = array();
foreach ($node->webform['components'] as $component) {
switch ($component['type']) {
case 'select':
$tokens[] = '%' . $component['form_key'];
$tokens[] = '%' . $component['form_key'] . '-all';
$tokens[] = '%' . $component['form_key'] . '-nl';
$tokens[] = '%' . $component['form_key'] . '-all-nl';
break;
case 'email':
case 'date':
case 'time':
case 'hidden':
case 'textarea':
case 'textfield':
case 'grid':
$tokens[] = '%' . $component['form_key'];
break;
// markup', 'pagebreak', etc.
default:
// calling _hook_webform2pdf_list_template_vars hivas, support of extra types
foreach (module_list() as $module) {
$function = '_' . $module . 'webform2pdf_list_template_vars';
if (function_exists($function)) {
call_user_func($function, $component, $tokens);
}
}
break;
}
}
$tokens[] = '%nid';
$tokens[] = '%sid';
return $tokens;
}