5 * Primary module hooks for {{ name }} module.
10 * Implements hook_theme().
12 function {{ machine_name }}_theme() {
14 '{{ template_name|h2u }}' => [
15 'variables' => ['foo' => NULL],
20 {% if create_preprocess %}
23 * Prepares variables for {{ template_name }} template.
25 * Default template: {{ template_name }}.html.twig.
27 * @param array $variables
28 * An associative array containing:
29 * - foo: Foo variable description.
31 function template_preprocess_{{ template_name|h2u }}(array &$variables) {
32 $variables['foo'] = 'bar';