You are here

function webform_theme in Webform 6.2

Same name and namespace in other branches
  1. 8.5 includes/webform.theme.inc \webform_theme()
  2. 6.3 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()

Implementation of hook_theme().

File

./webform.module, line 328

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,
        'limit_exceeded' => NULL,
        'allowed_roles' => NULL,
      ),
    ),
    'webform_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'template' => 'webform-form',
      'pattern' => 'webform_form_[0-9]+',
    ),
    'webform_mail_components_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
    ),
    'webform_mail_settings_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
    ),
    'webform_advanced_submit_limit_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
    ),
    'webform_admin_settings' => array(
      'arguments' => array(
        'form' => NULL,
      ),
    ),
    'webform_confirmation' => array(
      'arguments' => array(
        'node' => NULL,
        'sid' => NULL,
      ),
      'template' => 'webform-confirmation',
      'pattern' => 'webform_confirmation_[0-9]+',
    ),
    'webform_mail_message' => array(
      'arguments' => array(
        'form_values' => NULL,
        'node' => NULL,
        'sid' => NULL,
        'cid' => NULL,
      ),
      'template' => 'webform-mail',
      'pattern' => 'webform_mail(_[0-9]+)?',
    ),
    'webform_mail_fields' => array(
      'arguments' => array(
        'cid' => NULL,
        'value' => NULL,
        'node' => NULL,
        'indent' => NULL,
      ),
    ),
    'webform_mail_headers' => array(
      'arguments' => array(
        'form_values' => NULL,
        'node' => NULL,
        'sid' => NULL,
        'cid' => NULL,
      ),
      'pattern' => 'webform_mail_headers_[0-9]+',
    ),
    'webform_admin_content' => array(
      'arguments' => array(
        'nodes' => NULL,
      ),
    ),
    'webform_token_help' => array(
      'arguments' => array(),
    ),
    // webform_components.inc.
    'webform_components_form' => array(
      'arguments' => array(
        'form' => NULL,
      ),
    ),
    // webform_report.inc.
    'webform_results_per_page' => array(
      'arguments' => array(
        'total_count' => NULL,
        'pager_count' => NULL,
      ),
    ),
    'webform_results_submissions_header' => array(
      'arguments' => array(
        'node' => NULL,
      ),
    ),
    'webform_results_submissions' => array(
      'arguments' => array(
        'node' => NULL,
        'submissions' => NULL,
        'total_count' => NULL,
        'pager_count' => NULL,
      ),
    ),
    'webform_results_table_header' => array(
      'arguments' => array(
        'node' => NULL,
      ),
    ),
    'webform_results_table' => array(
      'arguments' => array(
        'node' => NULL,
        'components' => NULL,
        'submissions' => NULL,
        'node' => NULL,
        'total_count' => NULL,
        'pager_count' => NULL,
      ),
    ),
  );

  // Theme functions in all components.
  $components = webform_load_components(TRUE);
  foreach ($components as $key => $component) {
    $theme_hook = '_webform_theme_' . $key;
    if (function_exists($theme_hook)) {
      $theme = array_merge($theme, $theme_hook());
    }
  }
  return $theme;
}