Skip to content

Commit dea7e7b

Browse files
dotlabel-chrisweaverryan
authored andcommitted
Update cookbook/templating/twig_extension.rst
Set the namespace scope to global for \Twig_Extension and \Twig_Filter_Method.
1 parent 95d25d8 commit dea7e7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbook/templating/twig_extension.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ As an example we will create a price filter to format a given number into price:
2929
use Twig_Extension;
3030
use Twig_Filter_Method;
3131

32-
class AcmeExtension extends Twig_Extension
32+
class AcmeExtension extends \Twig_Extension
3333
{
3434
public function getFilters()
3535
{
3636
return array(
37-
'price' => new Twig_Filter_Method($this, 'priceFilter'),
37+
'price' => new \Twig_Filter_Method($this, 'priceFilter'),
3838
);
3939
}
4040

0 commit comments

Comments
 (0)