You are here

function yamlform_theme in YAML Form 8

Implements hook_theme().

File

./yamlform.module, line 343
Enables the creation of forms and questionnaires.

Code

function yamlform_theme() {
  $info = [
    'yamlform_help' => [
      'variables' => [
        'info' => [],
      ],
    ],
    'yamlform_help_video_youtube' => [
      'variables' => [
        'youtube_id' => NULL,
      ],
    ],
    'yamlform' => [
      'render element' => 'element',
    ],
    'yamlform_actions' => [
      'render element' => 'element',
    ],
    'yamlform_handler_email_summary' => [
      'variables' => [
        'settings' => NULL,
        'handler' => [],
      ],
    ],
    'yamlform_handler_remote_post_summary' => [
      'variables' => [
        'settings' => NULL,
        'handler' => [],
      ],
    ],
    'yamlform_confirmation' => [
      'variables' => [
        'yamlform' => NULL,
        'source_entity' => NULL,
        'yamlform_submission' => NULL,
      ],
    ],
    'yamlform_submission_navigation' => [
      'variables' => [
        'yamlform_submission' => NULL,
      ],
    ],
    'yamlform_submission_information' => [
      'variables' => [
        'yamlform_submission' => NULL,
        'source_entity' => NULL,
        'open' => FALSE,
      ],
    ],
    'yamlform_submission_html' => [
      'variables' => [
        'yamlform_submission' => NULL,
        'source_entity' => NULL,
      ],
    ],
    'yamlform_submission_table' => [
      'variables' => [
        'yamlform_submission' => NULL,
        'source_entity' => NULL,
      ],
    ],
    'yamlform_submission_text' => [
      'variables' => [
        'yamlform_submission' => NULL,
        'source_entity' => NULL,
      ],
    ],
    'yamlform_submission_yaml' => [
      'variables' => [
        'yamlform_submission' => NULL,
        'source_entity' => NULL,
      ],
    ],
    'yamlform_element_base_html' => [
      'variables' => [
        'element' => [],
        'value' => NULL,
        'options' => [],
      ],
    ],
    'yamlform_element_base_text' => [
      'variables' => [
        'element' => [],
        'value' => NULL,
        'options' => [],
      ],
    ],
    'yamlform_container_base_html' => [
      'variables' => [
        'element' => [],
        'value' => NULL,
        'options' => [],
      ],
    ],
    'yamlform_container_base_text' => [
      'variables' => [
        'element' => [],
        'value' => NULL,
        'options' => [],
      ],
    ],
    'yamlform_element_color_value_swatch' => [
      'variables' => [
        'element' => NULL,
        'value' => NULL,
        'options' => [],
      ],
    ],
    'yamlform_element_managed_file' => [
      'variables' => [
        'element' => NULL,
        'value' => NULL,
        'options' => [],
        'file' => NULL,
      ],
    ],
    'yamlform_element_audio_file' => [
      'variables' => [
        'element' => NULL,
        'value' => NULL,
        'options' => [],
        'file' => NULL,
      ],
    ],
    'yamlform_element_document_file' => [
      'variables' => [
        'element' => NULL,
        'value' => NULL,
        'options' => [],
        'file' => NULL,
      ],
    ],
    'yamlform_element_image_file' => [
      'variables' => [
        'element' => NULL,
        'value' => NULL,
        'options' => [],
        'file' => NULL,
      ],
    ],
    'yamlform_element_video_file' => [
      'variables' => [
        'element' => NULL,
        'value' => NULL,
        'options' => [],
        'file' => NULL,
      ],
    ],
    'yamlform_message' => [
      'render element' => 'element',
    ],
    'yamlform_composite_address' => [
      'render element' => 'element',
    ],
    'yamlform_composite_contact' => [
      'render element' => 'element',
    ],
    'yamlform_composite_creditcard' => [
      'render element' => 'element',
    ],
    'yamlform_composite_location' => [
      'render element' => 'element',
    ],
    'yamlform_composite_name' => [
      'render element' => 'element',
    ],
    'yamlform_codemirror' => [
      'variables' => [
        'code' => NULL,
        'type' => 'text',
      ],
    ],
    'yamlform_progress' => [
      'variables' => [
        'yamlform' => NULL,
        'current_page' => NULL,
      ],
    ],
    'yamlform_progress_bar' => [
      'variables' => [
        'yamlform' => NULL,
        'current_page' => NULL,
        'max_pages' => 10,
      ],
    ],
  ];

  // Since any rendering of a form is going to require 'yamlform.theme.inc'
  // we are going to just add it to every template.
  foreach ($info as &$template) {
    $template['file'] = 'includes/yamlform.theme.inc';
  }
  return $info;
}