You are here

function vud_theme in Vote Up/Down 8

Same name and namespace in other branches
  1. 6.3 vud.theme.inc \vud_theme()
  2. 6.2 vud.theme.inc \vud_theme()
  3. 7.2 vud.theme.inc \vud_theme()
  4. 7 vud.theme.inc \vud_theme()

Implementation of hook_theme().

File

./vud.theme.inc, line 14
Theme functions

Code

function vud_theme() {
  $module_handler = \Drupal::service('module_handler');
  $module_path = $module_handler
    ->getModule('vud')
    ->getPath();
  return [
    'vud_widget' => [
      'variables' => [
        'id' => NULL,
        'entity_id' => NULL,
        'entity_type_id' => NULL,
        'show_links' => FALSE,
        'show_up_as_link' => FALSE,
        'show_down_as_link' => FALSE,
        'show_reset' => FALSE,
        'link_up' => NULL,
        'link_down' => NULL,
        'link_reset' => NULL,
        'class_up' => TRUE,
        'class_down' => TRUE,
        'class_reset' => TRUE,
        'link_class_up' => NULL,
        'link_class_down' => NULL,
        'link_class_reset' => NULL,
        'reset_short_text' => NULL,
        'reset_long_text' => NULL,
        'up_points' => 0,
        'down_points' => 0,
        'up_percent' => 0,
        'down_percent' => 0,
        'percent_text' => NULL,
        'unsigned_points' => 0,
        'points' => 0,
        'vote_sum' => 0,
        'widget_template' => 'alternate',
        'template_path' => NULL,
        'base_path' => $module_path,
        'widget_name' => NULL,
        'widget_instance_id' => NULL,
        'vote_label' => 'votes',
      ],
    ],
  ];
}