You are here

function twig_tweak_test_twig_tweak_functions_alter in Twig Tweak 3.x

Same name and namespace in other branches
  1. 3.1.x tests/twig_tweak_test/twig_tweak_test.module \twig_tweak_test_twig_tweak_functions_alter()

Implements hook_twig_tweak_functions_alter().

File

tests/twig_tweak_test/twig_tweak_test.module, line 82
Primary module hooks for Twig Tweak test module.

Code

function twig_tweak_test_twig_tweak_functions_alter(array &$functions) {
  $functions[] = new TwigFunction('foo', function (string $value) : string {
    return "-={$value}=-";
  });
}