Carew\Twig\NodeVisitor\Paginator::enterNode PHP Method

enterNode() public method

public enterNode ( Twig_NodeInterface $node, Twig_Environment $env )
$node Twig_NodeInterface
$env Twig_Environment
    public function enterNode(\Twig_NodeInterface $node, \Twig_Environment $env)
    {
        if ($node instanceof \Twig_Node_Module) {
            $this->currentModule = $node;
            $this->currentNumberOfPagination = 0;
        } elseif ($node instanceof \Twig_Node_Expression_Function) {
            $name = $node->getAttribute('name');
            if ('paginate' == $name) {
                $node = $this->enterPaginationFilterNode($node, $env);
                ++$this->currentNumberOfPagination;
                return $node;
            }
            if ('render_documents' == $name) {
                $this->currentRenderDocuments = $node;
            }
        }
        return $node;
    }