function fillpdf_rules_action_info in FillPDF 7.2
Same name and namespace in other branches
- 7 fillpdf.rules.inc \fillpdf_rules_action_info()
Implements hook_rules_action_info(). @todo: Define the following actions:
- Fill a PDF with data from content
- Fill a PDF with data from Webform submissions
- Send PDF to user's browser
- Generate a FillPDF link (saves new variable - could be useful for e-mail
templates and such)
File
- ./
fillpdf.rules.inc, line 62 - fillpdf.rules.inc
Code
function fillpdf_rules_action_info() {
$defaults = array(
'group' => t('FillPDF'),
);
return array(
'fillpdf_load' => $defaults + array(
'label' => t('Load a FillPDF configuration'),
'base' => 'fillpdf_rules_action_load_fillpdf',
'provides' => array(
'fillpdf' => array(
'type' => 'fillpdf',
'label' => t('FillPDF metadata'),
),
),
'parameter' => array(
'fid' => array(
'type' => 'integer',
'label' => t('FillPDF Form ID'),
),
),
),
'fillpdf_merge_webform' => $defaults + array(
'label' => t('Fill a PDF with webform data'),
'base' => 'fillpdf_rules_action_merge_webform',
'description' => t('Populates the PDF with webform data and updates the
Rules variable with all information necessary to handle it.'),
'parameter' => array(
'fillpdf' => array(
'type' => 'fillpdf',
'label' => t('FillPDF metadata'),
),
'webform_nid' => array(
'type' => 'integer',
'label' => t('Webform Node ID'),
'optional' => TRUE,
'description' => t('If you leave this blank, the <em>Default Node ID</em> from the FillPDF configuration will be used.'),
),
'webform_sids' => array(
'type' => 'list<integer>',
'label' => t('Webform Submission ID(s)'),
'optional' => TRUE,
'description' => t('If you leave this blank, the most recent submission will be used. The last ID you specify will be checked first.'),
),
),
),
'fillpdf_handle_default' => $defaults + array(
'label' => t('Perform the default action on the PDF'),
'description' => t('Handle the PDF according to its FillPDF configuration.'),
'base' => 'fillpdf_rules_action_handle_default',
'parameter' => array(
'fillpdf' => array(
'type' => 'fillpdf',
'label' => t('FillPDF metadata'),
),
),
),
'fillpdf_save_to_file' => $defaults + array(
'label' => t('Save PDF to a file'),
'base' => 'fillpdf_rules_action_save_to_file',
'provides' => array(
'fillpdf_saved_file_path' => array(
'type' => 'text',
'label' => t('Path to saved PDF'),
),
),
'parameter' => array(
'fillpdf' => array(
'type' => 'fillpdf',
'label' => t('FillPDF metadata'),
),
),
),
'fillpdf_delete_saved_file' => $defaults + array(
'label' => t('Delete saved PDF'),
'base' => 'fillpdf_rules_action_delete_file',
'parameter' => array(
'filename' => array(
'type' => 'text',
'label' => t('Filename of PDF to delete'),
),
),
),
);
}