You are here

function webform_webform_submission_actions in Webform 7.4

Same name and namespace in other branches
  1. 6.3 webform.module \webform_webform_submission_actions()
  2. 7.3 webform.module \webform_webform_submission_actions()

Implements hook_webform_webform_submission_actions().

File

./webform.module, line 1292
This module provides a simple way to create forms and questionnaires.

Code

function webform_webform_submission_actions($node, $submission) {
  $actions = array();
  $destination = drupal_get_destination();
  if (module_exists('print_pdf') && user_access('access PDF version')) {
    $actions['printpdf'] = array(
      'title' => t('Download PDF'),
      'href' => 'printpdf/' . $node->nid . '/submission/' . $submission->sid,
      'query' => $destination,
    );
  }
  if (module_exists('print') && user_access('access print')) {
    $actions['print'] = array(
      'title' => t('Print'),
      'href' => 'print/' . $node->nid . '/submission/' . $submission->sid,
    );
  }
  if (webform_results_access($node) && count($node->webform['emails'])) {
    $actions['resend'] = array(
      'title' => t('Resend e-mails'),
      'href' => 'node/' . $node->nid . '/submission/' . $submission->sid . '/resend',
      'query' => drupal_get_destination(),
    );
  }
  return $actions;
}