function poll_theme
Implements hook_theme().
File
-
modules/
poll/ poll.module, line 32
Code
function poll_theme() {
$theme_hooks = array(
'poll_vote' => array(
'template' => 'poll-vote',
'render element' => 'form',
),
'poll_choices' => array(
'render element' => 'form',
),
'poll_results' => array(
'template' => 'poll-results',
'variables' => array(
'raw_title' => NULL,
'results' => NULL,
'votes' => NULL,
'raw_links' => NULL,
'block' => NULL,
'nid' => NULL,
'vote' => NULL,
),
),
'poll_bar' => array(
'template' => 'poll-bar',
'variables' => array(
'title' => NULL,
'votes' => NULL,
'total_votes' => NULL,
'vote' => NULL,
'block' => NULL,
),
),
);
// The theme system automatically discovers the theme's functions and
// templates that implement more targeted "suggestions" of generic theme
// hooks. But suggestions implemented by a module must be explicitly
// registered.
$theme_hooks += array(
'poll_results__block' => array(
'template' => 'poll-results--block',
'variables' => $theme_hooks['poll_results']['variables'],
),
'poll_bar__block' => array(
'template' => 'poll-bar--block',
'variables' => $theme_hooks['poll_bar']['variables'],
),
);
return $theme_hooks;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.