protected function Twig_Node_SandboxedPrint::removeNodeFilter in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/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:
File
- vendor/
Twig/ Node/ SandboxedPrint.php, line 51
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;
}