You are here

function rate_theme in Rate 8

Same name and namespace in other branches
  1. 8.2 rate.module \rate_theme()
  2. 6.2 rate.module \rate_theme()
  3. 7.2 rate.module \rate_theme()
  4. 7 rate.module \rate_theme()

Implements hook_theme().

File

./rate.module, line 95
Hook implementation code for the Rate module.

Code

function rate_theme($existing, $type, $theme, $path) {
  return [
    // Templates for default widget types.
    'rate_template_info_description' => [
      'variables' => [
        'info' => '',
        'description' => '',
      ],
      'template' => 'rate-template-info-description',
    ],
    'rate_template_thumbs_up' => [
      'variables' => [
        'results' => 0,
        'use_ajax' => FALSE,
        'can_vote' => FALSE,
        'has_voted' => FALSE,
        'user_voted' => NULL,
        'entity_id' => NULL,
        'entity_type_id' => NULL,
        'widget_type' => NULL,
      ],
      'template' => 'rate-template-thumbs-up',
    ],
    'rate_template_thumbs_up_down' => [
      'variables' => [
        'results' => 0,
        'use_ajax' => FALSE,
        'can_vote' => FALSE,
        'has_voted' => FALSE,
        'user_voted' => NULL,
        'entity_id' => NULL,
        'entity_type_id' => NULL,
        'widget_type' => NULL,
      ],
      'template' => 'rate-template-thumbs-up-down',
    ],
    'rate_template_number_up_down' => [
      'variables' => [
        'results' => 0,
        'use_ajax' => FALSE,
        'can_vote' => FALSE,
        'has_voted' => FALSE,
        'user_voted' => NULL,
        'entity_id' => NULL,
        'entity_type_id' => NULL,
        'widget_type' => NULL,
      ],
      'template' => 'rate-template-number-up-down',
    ],
    'rate_template_fivestar' => [
      'variables' => [
        'results' => 0,
        'use_ajax' => FALSE,
        'can_vote' => FALSE,
        'has_voted' => FALSE,
        'user_voted' => NULL,
        'entity_id' => NULL,
        'entity_type_id' => NULL,
        'widget_type' => NULL,
      ],
      'template' => 'rate-template-fivestar',
    ],
    'rate_template_yesno' => [
      'variables' => [
        'results' => 0,
        'use_ajax' => FALSE,
        'can_vote' => FALSE,
        'has_voted' => FALSE,
        'user_voted' => NULL,
        'entity_id' => NULL,
        'entity_type_id' => NULL,
        'widget_type' => NULL,
      ],
      'template' => 'rate-template-yesno',
    ],
  ];
}