Tale\Jade\Renderer::addFilter PHP Method

addFilter() public method

The filter can be called inside jade via the :-syntax The signature of the callback should be (Node $node, $indent, $newLine) where $node is the filter node that was encountered (including its children) and $indent and $newLine are indentation and the new line character as a string respecting the compiler's 'pretty' option This is just a proxy for the Compiler's addFilter method
public addFilter ( string $name, callable $callback )
$name string
$callback callable
    public function addFilter($name, $callback)
    {
        $this->getCompiler()->addFilter($name, $callback);
        return $this;
    }