fixed documentation for the sandbox security policy

This commit is contained in:
Fabien Potencier
2011-01-12 10:39:35 +01:00
parent f44f0cd109
commit c20116ee8d
+2 -1
View File
@@ -414,7 +414,8 @@ tags, filters, properties, and methods::
$properties = array(
'Article' => array('title', 'body'),
);
$policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties);
$functions = array('range');
$policy = new Twig_Sandbox_SecurityPolicy($tags, $filters, $methods, $properties, $functions);
With the previous configuration, the security policy will only allow usage of
the ``if`` tag, and the ``upper`` filter. Moreover, the templates will only be