You are here

function webform_theme in Webform 6.3

Same name and namespace in other branches
  1. 8.5 includes/webform.theme.inc \webform_theme()
  2. 6.2 webform.module \webform_theme()
  3. 7.4 webform.module \webform_theme()
  4. 7.3 webform.module \webform_theme()
  5. 6.x includes/webform.theme.inc \webform_theme()

Implements hook_theme().

File

./webform.module, line 502

Code

function webform_theme() {
  $theme = array(
    // webform.module.
    'webform_view' => array(
      'arguments' => array(
        'node' => NULL,
        'teaser' => NULL,
        'page' => NULL,
        'form' => NULL,
        'enabled' => NULL,
      ),
    ),
    'webform_view_messages' => array(
      'arguments' => array(
        'node' => NULL,
        'teaser' => NULL,
        'page' => NULL,
        'submission_count' => NULL,
        'user_limit_exceeded' => NULL,
        'total_limit_exceeded' => NULL,
        'allowed_roles' => NULL,
        'closed' => NULL,
        'cached' => FALSE,
      ),
    ),
    'webform_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'template' => 'templates/webform-form',
      'pattern' => 'webform_form_[0-9]+',
    ),
    'webform_confirmation' => array(
      'arguments' => array(
        'node' => NULL,
        'sid' => NULL,
      ),
      'template' => 'templates/webform-confirmation',
      'pattern' => 'webform_confirmation_[0-9]+',
    ),
    'webform_element' => array(
      'arguments' => array(
        'element' => NULL,
        'value' => NULL,
      ),
    ),
    'webform_element_wrapper' => array(
      'arguments' => array(
        'element' => NULL,
        'content' => NULL,
      ),
    ),
    'webform_element_text' => array(
      'arguments' => array(
        'element' => NULL,
        'value' => NULL,
      ),
    ),
    'webform_mail_message' => array(
      'arguments' => array(
        'node' => NULL,
        'submission' => NULL,
        'email' => NULL,
      ),
      'template' => 'templates/webform-mail',
      'pattern' => 'webform_mail(_[0-9]+)?',
    ),
    'webform_mail_headers' => array(
      'arguments' => array(
        'node' => NULL,
        'submission' => NULL,
        'email' => NULL,
      ),
      'pattern' => 'webform_mail_headers_[0-9]+',
    ),
    'webform_token_help' => array(
      'arguments' => array(
        'groups' => array(),
      ),
    ),
    // webform.admin.inc.
    'webform_admin_settings' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.admin.inc',
    ),
    'webform_admin_content' => array(
      'arguments' => array(
        'nodes' => NULL,
      ),
      'file' => 'includes/webform.admin.inc',
    ),
    // webform.emails.inc.
    'webform_emails_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.emails.inc',
    ),
    'webform_email_add_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.emails.inc',
    ),
    'webform_email_edit_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.emails.inc',
    ),
    // webform.components.inc.
    'webform_components_page' => array(
      'arguments' => array(
        'node' => NULL,
        'form' => NULL,
      ),
      'file' => 'includes/webform.components.inc',
    ),
    'webform_components_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.components.inc',
    ),
    'webform_component_select' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'includes/webform.components.inc',
    ),
    // webform.pages.inc.
    'webform_advanced_redirection_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.pages.inc',
    ),
    'webform_advanced_submit_limit_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.pages.inc',
    ),
    'webform_advanced_total_submit_limit_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.pages.inc',
    ),
    // webform.report.inc.
    'webform_results_per_page' => array(
      'arguments' => array(
        'total_count' => NULL,
        'pager_count' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_submissions_header' => array(
      'arguments' => array(
        'node' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_submissions' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'template' => 'templates/webform-results-submissions',
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_table_header' => array(
      'arguments' => array(
        'node' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_table' => array(
      'arguments' => array(
        'node' => NULL,
        'components' => NULL,
        'submissions' => NULL,
        'node' => NULL,
        'total_count' => NULL,
        'pager_count' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_download_range' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_download_select_format' => array(
      'arguments' => array(
        'element' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    'webform_results_analysis' => array(
      'arguments' => array(
        'node' => NULL,
        'data' => NULL,
        'sids' => array(),
        'component' => NULL,
      ),
      'file' => 'includes/webform.report.inc',
    ),
    // webform.submissions.inc
    'webform_submission' => array(
      'arguments' => array(
        'renderable' => NULL,
      ),
      'template' => 'templates/webform-submission',
      'pattern' => 'webform_submission_[0-9]+',
      'file' => 'includes/webform.submissions.inc',
    ),
    'webform_submission_page' => array(
      'arguments' => array(
        'node' => NULL,
        'submission' => NULL,
        'submission_content' => NULL,
        'submission_navigation' => NULL,
        'submission_information' => NULL,
        'submission_actions' => NULL,
        'mode' => NULL,
      ),
      'template' => 'templates/webform-submission-page',
      'file' => 'includes/webform.submissions.inc',
    ),
    'webform_submission_information' => array(
      'arguments' => array(
        'node' => NULL,
        'submission' => NULL,
        'mode' => 'display',
      ),
      'template' => 'templates/webform-submission-information',
      'file' => 'includes/webform.submissions.inc',
    ),
    'webform_submission_navigation' => array(
      'arguments' => array(
        'node' => NULL,
        'submission' => NULL,
        'mode' => NULL,
      ),
      'template' => 'templates/webform-submission-navigation',
      'file' => 'includes/webform.submissions.inc',
    ),
    'webform_submission_resend' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'includes/webform.submissions.inc',
    ),
  );

  // Theme functions in all components.
  $components = webform_components(TRUE);
  foreach ($components as $type => $component) {
    if ($theme_additions = webform_component_invoke($type, 'theme')) {
      $theme = array_merge($theme, $theme_additions);
    }
  }
  return $theme;
}