Symfony\Bundle\TwigBundle\Node\RouteNode::compile PHP Method

compile() public method

Compiles the node to PHP.
public compile ( $compiler )
    public function compile($compiler)
    {
        $compiler->addDebugInfo($this)->write('echo $this->env->getExtension(\'templating\')->getContainer()->get(\'router\')->generate(')->subcompile($this->getNode('route'))->raw(', ');
        $attr = $this->getNode('route_attributes');
        if ($attr) {
            $compiler->subcompile($attr);
        } else {
            $compiler->raw('array()');
        }
        $compiler->raw(', ')->raw($this->getAttribute('absolute') ? 'true' : 'false')->raw(");");
    }