
| Current Path : /var/www/html/vendor/chi-teck/drupal-code-generator/templates/template/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/vendor/chi-teck/drupal-code-generator/templates/template/module.twig |
<?php
/**
* @file
* Primary module hooks for {{ name }} module.
*/
{% if create_theme %}
/**
* Implements hook_theme().
*/
function {{ machine_name }}_theme() {
return [
'{{ template_name|h2u }}' => [
'variables' => ['foo' => NULL],
],
];
}
{% endif %}
{% if create_preprocess %}
/**
* Prepares variables for {{ template_name }} template.
*
* Default template: {{ template_name }}.html.twig.
*
* @param array $variables
* An associative array containing:
* - foo: Foo variable description.
*/
function template_preprocess_{{ template_name|h2u }}(array &$variables) {
$variables['foo'] = 'bar';
}
{% endif %}