protected function Twig_Node_SandboxedPrint::removeNodeFilter in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/twig/twig/lib/Twig/Node/SandboxedPrint.php \Twig_Node_SandboxedPrint::removeNodeFilter()
Removes node filters.
This is mostly needed when another visitor adds filters (like the escaper one).
Parameters
Twig_Node $node A Node:
Return value
File
- vendor/
twig/ twig/ lib/ Twig/ Node/ SandboxedPrint.php, line 43
Class
- Twig_Node_SandboxedPrint
- Twig_Node_SandboxedPrint adds a check for the __toString() method when the variable is an object and the sandbox is activated.
Code
protected function removeNodeFilter($node) {
if ($node instanceof Twig_Node_Expression_Filter) {
return $this
->removeNodeFilter($node
->getNode('node'));
}
return $node;
}