function template_preprocess_poll_vote in Poll 8
Implements template_preprocess_HOOK() for poll-vote.html.twig.
Parameters
array $variables: An associative array containing:
- form: The renderable form array for the poll voting form.
File
- ./
poll.module, line 128 - Collects votes on different topics in the form of multiple choice questions.
Code
function template_preprocess_poll_vote(&$variables) {
$form = $variables['form'];
$variables['question'] = $form['#entity']
->label();
$variables['show_question'] = !empty($form['#show_question']);
}