Skip to content

Commit 3b49772

Browse files
authored
Merge pull request #327 from neclimdul/twig-filter
Provide a stub for twig_escape_filter
2 parents b47279a + 71d3dc5 commit 3b49772

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

extension.neon

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ parameters:
1111
- install
1212
- profile
1313
- engine
14+
scanFiles:
15+
- stubs/Twig/functions.stub
1416
drupal:
1517
drupal_root: '%currentWorkingDirectory%'
1618
entityMapping:

stubs/Twig/functions.stub

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
use Twig\Environment;
4+
5+
/**
6+
* Escapes a string.
7+
*
8+
* @param mixed $string The value to be escaped
9+
* @param string $strategy The escaping strategy
10+
* @param string $charset The charset
11+
* @param bool $autoescape Whether the function is called by the auto-escaping feature (true) or by the developer (false)
12+
*
13+
* @return string
14+
*/
15+
function twig_escape_filter(Environment $env, $string, $strategy = 'html', $charset = null, $autoescape = false) {
16+
}

0 commit comments

Comments
 (0)