Issue #1898456 by joelpittet: Common_test().module - Convert theme_ functions to Twig.
parent
e89fbf339d
commit
c5cecfde1d
|
@ -249,17 +249,11 @@ function common_test_theme() {
|
||||||
return array(
|
return array(
|
||||||
'common_test_foo' => array(
|
'common_test_foo' => array(
|
||||||
'variables' => array('foo' => 'foo', 'bar' => 'bar'),
|
'variables' => array('foo' => 'foo', 'bar' => 'bar'),
|
||||||
|
'template' => 'common-test-foo',
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Provides a theme function for drupal_render().
|
|
||||||
*/
|
|
||||||
function theme_common_test_foo($variables) {
|
|
||||||
return $variables['foo'] . $variables['bar'];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements hook_library_info_alter().
|
* Implements hook_library_info_alter().
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
{#
|
||||||
|
/**
|
||||||
|
* @file
|
||||||
|
* Default theme implementation for the common test foo.
|
||||||
|
*
|
||||||
|
* Available variables:
|
||||||
|
* - foo: foo.
|
||||||
|
* - bar: bar.
|
||||||
|
*
|
||||||
|
* @see template_preprocess()
|
||||||
|
*
|
||||||
|
* @ingroup themeable
|
||||||
|
*/
|
||||||
|
#}
|
||||||
|
{{ foo }}{{ bar -}}
|
Loading…
Reference in New Issue